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
LOCAL_FOLDR='gravity-sync' # see above
SYNCING_LOG='gravity-sync.log' # see above
LOCAL_FOLDR='gravity-sync' # must exist in running user home folder
SYNCING_LOG='gravity-sync.log' # will be created in above folder
# PIHOLE DEFAULTS
PIHOLE_DIR='/etc/pihole' # default install directory
@ -48,6 +48,15 @@ else
exit
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
0)
echo -e "You must define the direction you want to replicate ${GRAVITY_FI}"