diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 42272122..b887a2b8 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -292,7 +292,9 @@ ra-param=*,0,0 fi else - rm "${dhcpconfig}" &> /dev/null + if [[ -f "${dhcpconfig}" ]]; then + rm "${dhcpconfig}" &> /dev/null + fi fi } diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index e37282a7..9d264846 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1503,16 +1503,11 @@ finalExports() { source "${setupVars}" source "${PI_HOLE_LOCAL_REPO}/advanced/Scripts/webpage.sh" - if [[ "${DNS_FQDN_REQUIRED}" != "" ]] ; then # Look for DNS server settings which would have to be reapplied - ProcessDNSSettings - fi - - if [[ "${DHCP_ACTIVE}" != "" ]] ; then - # Look for DHCP server settings which would have to be reapplied - ProcessDHCPSettings - fi + ProcessDNSSettings + # Look for DHCP server settings which would have to be reapplied + ProcessDHCPSettings } # Install the logrotate script diff --git a/test/test_automated_install.py b/test/test_automated_install.py index 4a4f72aa..9129c314 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -59,6 +59,8 @@ def test_setupVars_saved_to_file(Pihole): TERM=xterm source /opt/pihole/basic-install.sh {} + mkdir -p /etc/dnsmasq.d + version_check_dnsmasq finalExports cat /etc/pihole/setupVars.conf '''.format(set_setup_vars))