1
0
mirror of https://github.com/moparisthebest/pi-hole synced 2024-11-05 00:45:08 -05:00

Update chronometer.sh

Missed a change todaysAdsEliminated to /\/etc\/pihole\/gravity.list/
This commit is contained in:
Dan 2015-07-30 18:01:10 +01:00
parent 9d99a4ef36
commit 024395b73b

View File

@ -17,7 +17,7 @@ do
todaysQueryCount=$(cat /var/log/pihole.log | grep "$today" | awk '/query/ {print $7}' | wc -l) todaysQueryCount=$(cat /var/log/pihole.log | grep "$today" | awk '/query/ {print $7}' | wc -l)
todaysQueryCountV4=$(cat /var/log/pihole.log | grep "$today" | awk '/query/ && /\[A\]/ {print $7}' | wc -l) todaysQueryCountV4=$(cat /var/log/pihole.log | grep "$today" | awk '/query/ && /\[A\]/ {print $7}' | wc -l)
todaysQueryCountV6=$(cat /var/log/pihole.log | grep "$today" | awk '/query/ && /\[AAAA\]/ {print $7}' | wc -l) todaysQueryCountV6=$(cat /var/log/pihole.log | grep "$today" | awk '/query/ && /\[AAAA\]/ {print $7}' | wc -l)
todaysAdsEliminated=$(cat /var/log/pihole.log | grep "$today" | awk '/\/etc\/hosts/ {print $7}' | wc -l) todaysAdsEliminated=$(cat /var/log/pihole.log | grep "$today" | awk '/\/etc\/pihole\/gravity.list/ {print $7}' | wc -l)
dividend=$(echo "$todaysAdsEliminated/$todaysQueryCount" | bc -l) dividend=$(echo "$todaysAdsEliminated/$todaysQueryCount" | bc -l)
fp=$(echo "$dividend*100" | bc -l) fp=$(echo "$dividend*100" | bc -l)
percentAds=$(echo ${fp:0:4}) percentAds=$(echo ${fp:0:4})