Check for pihole directory/db

This commit is contained in:
Michael Stanclift 2020-05-21 13:53:12 -05:00
parent 43c9c81b6c
commit 76be06d6a4

View File

@ -19,8 +19,8 @@ REMOTE_USER='ubuntu'
# CUSTOMIZATION # CUSTOMIZATION
LOCAL_FOLDR='gravity-sync' # see above LOCAL_FOLDR='gravity-sync' # must exist in running user home folder
SYNCING_LOG='gravity-sync.log' # see above SYNCING_LOG='gravity-sync.log' # will be created in above folder
# PIHOLE DEFAULTS # PIHOLE DEFAULTS
PIHOLE_DIR='/etc/pihole' # default install directory PIHOLE_DIR='/etc/pihole' # default install directory
@ -48,6 +48,15 @@ else
exit exit
fi fi
# check to see if current pihole directory is correct
if [ -d ${PIHOLE_DIR}/${GRAVITY_FI} ]
then
echo -e "${GREEN}Success${NC}: Required file ${PIHOLE_DIR}/${GRAVITY_FI} is present"
else
echo -e "${RED}Failure${NC}: Required file ${PIHOLE_DIR}/${GRAVITY_FI} is missing"
exit
fi
case $# in case $# in
0) 0)
echo -e "You must define the direction you want to replicate ${GRAVITY_FI}" echo -e "You must define the direction you want to replicate ${GRAVITY_FI}"