Merge pull request #3608 from yubiuser/fix/customDNSfile

Create custom.list during install/update if it doesn't exist
This commit is contained in:
Dan Schaper 2020-07-26 12:51:19 -07:00 committed by GitHub
commit dfd331c5b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1476,6 +1476,15 @@ installConfigs() {
return 1
fi
fi
# Install empty custom.list file if it does not exist
if [[ ! -r "${PI_HOLE_CONFIG_DIR}/custom.list" ]]; then
if ! install -o root -m 644 /dev/null "${PI_HOLE_CONFIG_DIR}/custom.list" &>/dev/null; then
printf " %bError: Unable to initialize configuration file %s/custom.list\\n" "${COL_LIGHT_RED}" "${PI_HOLE_CONFIG_DIR}"
return 1
fi
fi
# If the user chose to install the dashboard,
if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
# and if the Web server conf directory does not exist,