From a4f58b0a22ff9e0afdaa08db34c771f3f6d98a4c Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 22 Dec 2016 19:09:37 +0100 Subject: [PATCH] Look for "query[" instead of "query" to avoid false-positives, like listed below root@raspberrypi:/etc/.pihole# grep 'query' /var/log/pihole.log | grep -v 'query\[' Dec 22 16:29:50 dnsmasq[30801]: forwarded code.jquery.com to 208.67.222.222 Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.com is Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 94.31.29.54 Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 23.111.11.3 Dec 22 16:29:50 dnsmasq[30801]: reply code.jquery.netdna-cdn.com is 198.232.125.113 --- advanced/Scripts/chronometer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh index 702ed1c9..a28bb868 100755 --- a/advanced/Scripts/chronometer.sh +++ b/advanced/Scripts/chronometer.sh @@ -33,7 +33,7 @@ CalcBlockedDomains() { CalcQueriesToday() { if [ -e "${piLog}" ]; then - queriesToday=$(awk '/query/ {print $6}' < "${piLog}" | wc -l) + queriesToday=$(awk '/query\[/ {print $6}' < "${piLog}" | wc -l) else queriesToday="Err." fi