Fix backup custom.list if not already created

This commit is contained in:
Michael Stanclift 2020-06-01 15:45:44 -05:00
parent 3f5558bbf3
commit 0c604685c7

View File

@ -191,11 +191,14 @@ function pull_gs {
if [ "$SKIP_CUSTOM" != '1' ]
then
if [ "$REMOTE_CUSTOM_DNS" == "1" ]
then
if [ -f ${PIHOLE_DIR}/${CUSTOM_DNS} ]
then
MESSAGE="Backing Up ${CUSTOM_DNS} on $HOSTNAME"
echo_stat
cp ${PIHOLE_DIR}/${CUSTOM_DNS} $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/${CUSTOM_DNS}.backup >/dev/null 2>&1
error_validate
fi
MESSAGE="Pulling ${CUSTOM_DNS} from ${REMOTE_HOST}"
echo_stat