Remove duplicate code

* Make RestartDNS() use `pihole restartdns`

Signed-off-by: WaLLy3K <wally3k@pi-hole.net>
pull/1631/head
WaLLy3K 7 years ago committed by GitHub
parent 406098e55a
commit 61ff0452e1

@ -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() {

Loading…
Cancel
Save