From 52ef76d71700f33717e93cf34e7ef1014f833b5c Mon Sep 17 00:00:00 2001 From: Fourdee Date: Thu, 30 Jul 2015 18:10:26 +0100 Subject: [PATCH] missed a few more /etc/host changes --- advanced/Scripts/chronometer.sh | 2 +- advanced/Scripts/whitelist.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh index 816722da..73219760 100755 --- a/advanced/Scripts/chronometer.sh +++ b/advanced/Scripts/chronometer.sh @@ -11,7 +11,7 @@ do uptime | cut -d' ' -f11- echo "-------------------------------" # Uncomment to continually read the log file and display the current domain being blocked - #tail -f /var/log/pihole.log | awk '/\/etc\/hosts/ {if ($7 != "address" && $7 != "name" && $7 != "/etc/pihole/gravity.list") print $7; else;}' + #tail -f /var/log/pihole.log | awk '/\/etc\/pihole\/gravity.list/ {if ($7 != "address" && $7 != "name" && $7 != "/etc/pihole/gravity.list") print $7; else;}' today=$(date "+%b %e") todaysQueryCount=$(cat /var/log/pihole.log | grep "$today" | awk '/query/ {print $7}' | wc -l) diff --git a/advanced/Scripts/whitelist.sh b/advanced/Scripts/whitelist.sh index 947e798c..aed6bd0f 100755 --- a/advanced/Scripts/whitelist.sh +++ b/advanced/Scripts/whitelist.sh @@ -3,11 +3,11 @@ for var in "$@" do echo "Whitelisting $var..." - # Use sed to search for the domain in /etc/hosts and remove it using an in-place edit - sed -i "/$var/d" /etc/hosts + # Use sed to search for the domain in /etc/pihole/gravity.list and remove it using an in-place edit + sed -i "/$var/d" /etc/pihole/gravity.list # Also add the domain to the whitelist.txt in /etc/pihole echo "$var" >> /etc/pihole/whitelist.txt done echo "** $# domain(s) whitelisted." -# Force dnsmasq to reload /etc/hosts +# Force dnsmasq to reload /etc/pihole/gravity.list kill -HUP $(pidof dnsmasq) \ No newline at end of file