mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-18 06:08:21 +00:00
Merge branch 'development' of https://github.com/jacobsalmela/pi-hole into development
This commit is contained in:
commit
494fcd60ab
@ -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"
|
||||||
|
@ -271,6 +271,15 @@ installCron(){
|
|||||||
$SUDO curl -o /etc/cron.d/pihole https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/pihole.cron
|
$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()
|
installPihole()
|
||||||
{
|
{
|
||||||
installDependencies
|
installDependencies
|
||||||
@ -284,6 +293,7 @@ installConfigs
|
|||||||
installWebAdmin
|
installWebAdmin
|
||||||
installPiholeWeb
|
installPiholeWeb
|
||||||
installCron
|
installCron
|
||||||
|
tidyEtcPihole
|
||||||
$SUDO /usr/local/bin/gravity.sh
|
$SUDO /usr/local/bin/gravity.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user