From aaab3306a87c7e8384bbe0c4e46cb0c6e56acc03 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 12 Dec 2016 10:38:21 +0100 Subject: [PATCH] Add restart DNS capability --- advanced/Scripts/webpage.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index bdd3a17f..a7a76161 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -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