1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-23 07:18:07 +00:00

Move call to CheckIPv6 function into CalcBlockedDomains, rather than relying on remembering to call it before you call CalcBlockedDomains.

This commit is contained in:
Promofaux 2016-01-19 21:14:01 +00:00
parent 03277899ca
commit af982a02af

View File

@ -15,6 +15,7 @@ gravity="/etc/pihole/gravity.list"
today=$(date "+%b %e") today=$(date "+%b %e")
function CalcBlockedDomains(){ function CalcBlockedDomains(){
CheckIPv6
if [ -e "$gravity" ]; then if [ -e "$gravity" ]; then
#Are we IPV6 or IPV4? #Are we IPV6 or IPV4?
if [[ -n $piholeIPv6 ]];then if [[ -n $piholeIPv6 ]];then
@ -66,7 +67,6 @@ function outputJSON(){
CalcblockedToday CalcblockedToday
CalcPercentBlockedToday CalcPercentBlockedToday
CheckIPv6
CalcBlockedDomains CalcBlockedDomains
printf '{"domains_being_blocked":"%s","dns_queries_today":"%s","ads_blocked_today":"%s","ads_percentage_today":"%s"}\n' "$blockedDomainsTotal" "$queriesToday" "$blockedToday" "$percentBlockedToday" printf '{"domains_being_blocked":"%s","dns_queries_today":"%s","ads_blocked_today":"%s","ads_percentage_today":"%s"}\n' "$blockedDomainsTotal" "$queriesToday" "$blockedToday" "$percentBlockedToday"