From d7b5870ba63c23cb873f541b394d43d669372262 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 12 Mar 2017 23:15:23 +0100 Subject: [PATCH] Use absolute path for pihole command in gravity.sh. Fixes #1318 --- gravity.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gravity.sh b/gravity.sh index 08590251..7441dd87 100755 --- a/gravity.sh +++ b/gravity.sh @@ -26,10 +26,11 @@ EOM exit 0 } +PIHOLE_COMMAND="/usr/local/bin/pihole" adListFile=/etc/pihole/adlists.list adListDefault=/etc/pihole/adlists.default -whitelistScript="pihole -w" +whitelistScript="${PIHOLE_COMMAND} -w" whitelistFile=/etc/pihole/whitelist.txt blacklistFile=/etc/pihole/blacklist.txt readonly wildcardlist="/etc/dnsmasq.d/03-pihole-wildcard.conf" @@ -385,7 +386,7 @@ gravity_reload() { #Now replace the line in dnsmasq file # sed -i "s/^addn-hosts.*/addn-hosts=$adList/" /etc/dnsmasq.d/01-pihole.conf - pihole restartdns + "${PIHOLE_COMMAND}" restartdns echo " done!" } @@ -423,4 +424,4 @@ gravity_hostFormat gravity_blackbody gravity_reload -pihole status +"${PIHOLE_COMMAND}" status