mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +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() {
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue