mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Reprocess DHCP settings after update
This commit is contained in:
parent
5c7fc05a32
commit
85f0241c0d
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue