mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Update dnsmasq file when changing upstream DNS servers and restart the service to get it active
This commit is contained in:
parent
d4f83cb1d4
commit
2f4b7ce3dd
1 changed files with 8 additions and 0 deletions
|
@ -65,6 +65,14 @@ SetDNSServers(){
|
|||
echo "PIHOLE_DNS_1=${args[2]}" >> /etc/pihole/setupVars.conf
|
||||
echo "PIHOLE_DNS_2=${args[3]}" >> /etc/pihole/setupVars.conf
|
||||
|
||||
# Replace within actual dnsmasq config file
|
||||
sed -i '/server=/d;' /etc/dnsmasq.d/01-pihole.conf
|
||||
echo "server=${args[2]}" >> /etc/dnsmasq.d/01-pihole.conf
|
||||
echo "server=${args[3]}" >> /etc/dnsmasq.d/01-pihole.conf
|
||||
|
||||
# Restart dnsmasq to load new configuration
|
||||
RestartDNS
|
||||
|
||||
}
|
||||
|
||||
SetExcludeDomains(){
|
||||
|
|
Loading…
Reference in a new issue