1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-10-31 20:59:00 +00:00

Add restart DNS capability

This commit is contained in:
DL6ER 2016-12-12 10:38:21 +01:00
parent 2bafa2f2ac
commit aaab3306a8

View File

@ -89,6 +89,16 @@ Reboot(){
} }
RestartDNS(){
if [ -x "$(command -v systemctl)" ]; then
systemctl restart dnsmasq &> /dev/null
else
service dnsmasq restart &> /dev/null
fi
}
for var in "$@"; do for var in "$@"; do
case "${var}" in case "${var}" in
"-p" | "password" ) SetWebPassword;; "-p" | "password" ) SetWebPassword;;
@ -98,6 +108,7 @@ for var in "$@"; do
"setexcludedomains" ) SetExcludeDomains;; "setexcludedomains" ) SetExcludeDomains;;
"setexcludeclients" ) SetExcludeClients;; "setexcludeclients" ) SetExcludeClients;;
"reboot" ) Reboot;; "reboot" ) Reboot;;
"restartdns" ) RestartDNS;;
"-h" | "--help" ) helpFunc;; "-h" | "--help" ) helpFunc;;
esac esac
done done