1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Reprocess DHCP settings after update

This commit is contained in:
DL6ER 2017-01-02 10:50:59 +01:00
parent 5c7fc05a32
commit 85f0241c0d
No known key found for this signature in database
GPG Key ID: BB8EC0BC77973A30
2 changed files with 11 additions and 1 deletions

View File

@ -179,6 +179,8 @@ SetQueryLogOptions(){
ProcessDHCPSettings() {
if [[ "${DHCP_ACTIVE}" == "true" ]]; then
source "${setupVars}"
interface=$(grep 'PIHOLE_INTERFACE=' /etc/pihole/setupVars.conf | sed "s/.*=//")
@ -211,6 +213,9 @@ dhcp-range=::100,::1ff,constructor:${interface},ra-names,slaac,${leasetime}
ra-param=*,0,0
" > "${dhcpconfig}"
else
rm "${dhcpconfig}"
fi
}
EnableDHCP(){
@ -239,7 +244,7 @@ DisableDHCP(){
delete_dnsmasq_setting "dhcp-"
delete_dnsmasq_setting "quiet-dhcp"
rm "${dhcpconfig}"
ProcessDHCPSettings
RestartDNS
}

View File

@ -892,9 +892,14 @@ finalExports() {
# Look for DNS server settings which would have to be reapplied
source "${setupVars}"
source "/etc/.pihole/advanced/Scripts/webpage.sh"
if [[ "${DNS_FQDN_REQUIRED}" != "" ]] ; then
ProcessDNSSettings
fi
if [[ "${DHCP_ACTIVE}" != "" ]] ; then
ProcessDHCPSettings
fi
}
installPihole() {