diff --git a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh index b29480a9..54916d6e 100755 --- a/advanced/Scripts/chronometer.sh +++ b/advanced/Scripts/chronometer.sh @@ -15,6 +15,7 @@ gravity="/etc/pihole/gravity.list" today=$(date "+%b %e") function CalcBlockedDomains(){ + CheckIPv6 if [ -e "$gravity" ]; then #Are we IPV6 or IPV4? if [[ -n $piholeIPv6 ]];then @@ -66,7 +67,6 @@ function outputJSON(){ CalcblockedToday CalcPercentBlockedToday - CheckIPv6 CalcBlockedDomains printf '{"domains_being_blocked":"%s","dns_queries_today":"%s","ads_blocked_today":"%s","ads_percentage_today":"%s"}\n' "$blockedDomainsTotal" "$queriesToday" "$blockedToday" "$percentBlockedToday" diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 82cfbf96..aa56b45d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -271,6 +271,15 @@ installCron(){ $SUDO curl -o /etc/cron.d/pihole https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/pihole.cron } +tidyEtcPihole() +{ +if ls /etc/pihole/list* 1> /dev/null 2>&1; then + echo "Cleaning up previous install" + $SUDO rm /etc/pihole/list.* +fi + +} + installPihole() { installDependencies @@ -284,6 +293,7 @@ installConfigs installWebAdmin installPiholeWeb installCron +tidyEtcPihole $SUDO /usr/local/bin/gravity.sh }