mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Add restart DNS capability
This commit is contained in:
parent
2bafa2f2ac
commit
aaab3306a8
@ -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
|
||||
case "${var}" in
|
||||
"-p" | "password" ) SetWebPassword;;
|
||||
@ -98,6 +108,7 @@ for var in "$@"; do
|
||||
"setexcludedomains" ) SetExcludeDomains;;
|
||||
"setexcludeclients" ) SetExcludeClients;;
|
||||
"reboot" ) Reboot;;
|
||||
"restartdns" ) RestartDNS;;
|
||||
"-h" | "--help" ) helpFunc;;
|
||||
esac
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user