mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-08 17:05:17 +02: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
@ -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…
x
Reference in New Issue
Block a user