From 16f1d7fad9420b8fb6aa83cbcd9c82400f122444 Mon Sep 17 00:00:00 2001 From: tuplink Date: Wed, 19 Oct 2016 21:50:34 -0400 Subject: [PATCH 1/4] Blacklist unwhitelisted --- advanced/Scripts/whitelist.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/advanced/Scripts/whitelist.sh b/advanced/Scripts/whitelist.sh index 2b572d00..b294e7b6 100755 --- a/advanced/Scripts/whitelist.sh +++ b/advanced/Scripts/whitelist.sh @@ -99,6 +99,8 @@ RemoveDomain(){ fi else echo "$1" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' ${whitelist} + #Blacklist unwhitelisted + ${blacklistScript} $1 fi } From 74bfcea6a8653299f261efe89228654b1b1b1f16 Mon Sep 17 00:00:00 2001 From: tuplink Date: Wed, 19 Oct 2016 22:00:03 -0400 Subject: [PATCH 2/4] add blacklistScript var --- advanced/Scripts/whitelist.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/advanced/Scripts/whitelist.sh b/advanced/Scripts/whitelist.sh index b294e7b6..2dea6e7c 100755 --- a/advanced/Scripts/whitelist.sh +++ b/advanced/Scripts/whitelist.sh @@ -33,6 +33,7 @@ fi #globals basename=pihole piholeDir=/etc/${basename} +blacklistScript=/opt/pihole/blacklist.sh adList=${piholeDir}/gravity.list whitelist=${piholeDir}/whitelist.txt reload=true From 41056ace0264deb0102425e9e5983bae4f7a664d Mon Sep 17 00:00:00 2001 From: tuplink Date: Thu, 20 Oct 2016 06:29:53 -0400 Subject: [PATCH 3/4] use pihole instead of direct path --- advanced/Scripts/whitelist.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/advanced/Scripts/whitelist.sh b/advanced/Scripts/whitelist.sh index 2dea6e7c..3d0561ef 100755 --- a/advanced/Scripts/whitelist.sh +++ b/advanced/Scripts/whitelist.sh @@ -33,7 +33,6 @@ fi #globals basename=pihole piholeDir=/etc/${basename} -blacklistScript=/opt/pihole/blacklist.sh adList=${piholeDir}/gravity.list whitelist=${piholeDir}/whitelist.txt reload=true @@ -100,8 +99,7 @@ RemoveDomain(){ fi else echo "$1" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' ${whitelist} - #Blacklist unwhitelisted - ${blacklistScript} $1 + pihole -g fi } From bbcf4800de3cf9253502285c3fe40547da13902b Mon Sep 17 00:00:00 2001 From: tuplink Date: Thu, 20 Oct 2016 06:30:48 -0400 Subject: [PATCH 4/4] use pihole instead of direct path --- advanced/Scripts/whitelist.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/advanced/Scripts/whitelist.sh b/advanced/Scripts/whitelist.sh index 3d0561ef..a2e31c8a 100755 --- a/advanced/Scripts/whitelist.sh +++ b/advanced/Scripts/whitelist.sh @@ -99,6 +99,7 @@ RemoveDomain(){ fi else echo "$1" | sed 's/\./\\./g' | xargs -I {} perl -i -ne'print unless /'{}'(?!.)/;' ${whitelist} + #reload gravity to pickup any entries this may have removed pihole -g fi }