Update dnsmasq file when changing upstream DNS servers and restart the service to get it active

pull/976/head
DL6ER 8 years ago
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…
Cancel
Save