Restart pihole in the more appropriate restartServices() function

This commit is contained in:
Orazio 2020-01-26 15:37:42 +01:00
parent e0ee6cf937
commit 8886eab1dc

View file

@ -1350,7 +1350,6 @@ askClientDNS(){
if (whiptail --backtitle "Setup PiVPN" --title "Pi-hole" --yesno "We have detected a Pi-hole installation, do you want to use it as the DNS server for the VPN, so you get ad blocking on the go?" ${r} ${c}); then if (whiptail --backtitle "Setup PiVPN" --title "Pi-hole" --yesno "We have detected a Pi-hole installation, do you want to use it as the DNS server for the VPN, so you get ad blocking on the go?" ${r} ${c}); then
pivpnDNS1="$vpnGw" pivpnDNS1="$vpnGw"
echo "interface=$pivpnDEV" | $SUDO tee /etc/dnsmasq.d/02-pivpn.conf > /dev/null echo "interface=$pivpnDEV" | $SUDO tee /etc/dnsmasq.d/02-pivpn.conf > /dev/null
$SUDO pihole restartdns
echo "pivpnDNS1=${pivpnDNS1}" >> /tmp/setupVars.conf echo "pivpnDNS1=${pivpnDNS1}" >> /tmp/setupVars.conf
echo "pivpnDNS2=${pivpnDNS2}" >> /tmp/setupVars.conf echo "pivpnDNS2=${pivpnDNS2}" >> /tmp/setupVars.conf
return return
@ -1995,6 +1994,10 @@ restartServices(){
fi fi
;; ;;
esac esac
if [ -f /etc/dnsmasq.d/02-pivpn.conf ]; then
$SUDO pihole restartdns
fi
} }
askUnattendedUpgrades(){ askUnattendedUpgrades(){