From 61ff0452e135445b6782e24a8c5783c3aad97eff Mon Sep 17 00:00:00 2001 From: WaLLy3K Date: Mon, 24 Jul 2017 21:27:12 +1000 Subject: [PATCH] Remove duplicate code * Make RestartDNS() use `pihole restartdns` Signed-off-by: WaLLy3K --- advanced/Scripts/webpage.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 42272122..1f90f9c3 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -221,20 +221,7 @@ Reboot() { } RestartDNS() { - local str="Restarting DNS service" - [[ -t 1 ]] && echo -ne " ${INFO} ${str}" - if command -v systemctl &> /dev/null; then - output=$( { systemctl restart dnsmasq; } 2>&1 ) - else - output=$( { service dnsmasq restart; } 2>&1 ) - fi - - if [[ -z "${output}" ]]; then - [[ -t 1 ]] && echo -e "${OVER} ${TICK} ${str}" - else - [[ ! -t 1 ]] && OVER="" - echo -e "${OVER} ${CROSS} ${output}" - fi + /usr/local/bin/pihole restartdns } SetQueryLogOptions() {