From dda448e0503eaeb8d95992fbdb3b29dd216c8e4a Mon Sep 17 00:00:00 2001 From: Tommy Huff Date: Thu, 20 Oct 2016 09:15:03 -0400 Subject: [PATCH] use finction in pihole to restart dnsmasq --- gravity.sh | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/gravity.sh b/gravity.sh index 2d3c4f09..d51cc814 100755 --- a/gravity.sh +++ b/gravity.sh @@ -322,23 +322,7 @@ gravity_reload() { # sed -i "s/^addn-hosts.*/addn-hosts=$adList/" /etc/dnsmasq.d/01-pihole.conf find "$piholeDir" -type f -exec chmod 666 {} \; - dnsmasqPid=$(pidof dnsmasq) - - if [[ ${dnsmasqPid} ]]; then - # service already running - reload config - if [ -x "$(command -v systemctl)" ]; then - systemctl restart dnsmasq - else - service dnsmasq restart - fi - else - # service not running, start it up - if [ -x "$(command -v systemctl)" ]; then - systemctl start dnsmasq - else - service dnsmasq start - fi - fi + pihole restartdnsmasq } for var in "$@"