1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +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() { ProcessDHCPSettings() {
if [[ "${DHCP_ACTIVE}" == "true" ]]; then
source "${setupVars}" source "${setupVars}"
interface=$(grep 'PIHOLE_INTERFACE=' /etc/pihole/setupVars.conf | sed "s/.*=//") 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 ra-param=*,0,0
" > "${dhcpconfig}" " > "${dhcpconfig}"
else
rm "${dhcpconfig}"
fi
} }
EnableDHCP(){ EnableDHCP(){
@ -239,7 +244,7 @@ DisableDHCP(){
delete_dnsmasq_setting "dhcp-" delete_dnsmasq_setting "dhcp-"
delete_dnsmasq_setting "quiet-dhcp" delete_dnsmasq_setting "quiet-dhcp"
rm "${dhcpconfig}" ProcessDHCPSettings
RestartDNS RestartDNS
} }

View File

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