mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
remove filename from whitelist output
I also cleared the whitespace (or rather, Atom did). I moved the pinhole.conf to it's current location I commented out mahakala
This commit is contained in:
parent
a675dc3f2c
commit
a06098bb16
1 changed files with 19 additions and 18 deletions
13
gravity.sh
13
gravity.sh
|
@ -8,7 +8,7 @@ piholeIP=$(hostname -I)
|
||||||
# Ad-list sources--one per line in single quotes
|
# Ad-list sources--one per line in single quotes
|
||||||
sources=('https://adaway.org/hosts.txt'
|
sources=('https://adaway.org/hosts.txt'
|
||||||
'http://adblock.gjtech.net/?format=unix-hosts'
|
'http://adblock.gjtech.net/?format=unix-hosts'
|
||||||
'http://adblock.mahakala.is/'
|
#'http://adblock.mahakala.is/'
|
||||||
'http://hosts-file.net/.%5Cad_servers.txt'
|
'http://hosts-file.net/.%5Cad_servers.txt'
|
||||||
'http://www.malwaredomainlist.com/hostslist/hosts.txt'
|
'http://www.malwaredomainlist.com/hostslist/hosts.txt'
|
||||||
'http://pgl.yoyo.org/adservers/serverlist.php?'
|
'http://pgl.yoyo.org/adservers/serverlist.php?'
|
||||||
|
@ -19,9 +19,6 @@ sources=('https://adaway.org/hosts.txt'
|
||||||
adList=/etc/pihole/gravity.list
|
adList=/etc/pihole/gravity.list
|
||||||
origin=/etc/pihole
|
origin=/etc/pihole
|
||||||
piholeDir=/etc/pihole
|
piholeDir=/etc/pihole
|
||||||
if [[ -f $piholeDir/pihole.conf ]];then
|
|
||||||
. $piholeDir/pihole.conf
|
|
||||||
fi
|
|
||||||
justDomainsExtension=domains
|
justDomainsExtension=domains
|
||||||
matter=pihole.0.matter.txt
|
matter=pihole.0.matter.txt
|
||||||
andLight=pihole.1.andLight.txt
|
andLight=pihole.1.andLight.txt
|
||||||
|
@ -30,10 +27,14 @@ eventHorizon=pihole.3.eventHorizon.txt
|
||||||
accretionDisc=pihole.4.accretionDisc.txt
|
accretionDisc=pihole.4.accretionDisc.txt
|
||||||
eyeOfTheNeedle=pihole.5.wormhole.txt
|
eyeOfTheNeedle=pihole.5.wormhole.txt
|
||||||
blacklist=$piholeDir/blacklist.txt
|
blacklist=$piholeDir/blacklist.txt
|
||||||
latentBlacklist=$origin/latentBlacklist.txt
|
|
||||||
whitelist=$piholeDir/whitelist.txt
|
whitelist=$piholeDir/whitelist.txt
|
||||||
latentWhitelist=$origin/latentWhitelist.txt
|
latentWhitelist=$origin/latentWhitelist.txt
|
||||||
|
|
||||||
|
# After setting defaults, check if there's local overrides
|
||||||
|
if [[ -r $piholeDir/pihole.conf ]];then
|
||||||
|
echo "** Local calibration requested..."
|
||||||
|
. $piholeDir/pihole.conf
|
||||||
|
fi
|
||||||
echo "** Neutrino emissions detected..."
|
echo "** Neutrino emissions detected..."
|
||||||
|
|
||||||
# Create the pihole resource directory if it doesn't exist. Future files will be stored here
|
# Create the pihole resource directory if it doesn't exist. Future files will be stored here
|
||||||
|
@ -141,7 +142,7 @@ if [[ -r $whitelist ]];then
|
||||||
# Remove whitelist entries
|
# Remove whitelist entries
|
||||||
numberOf=$(cat $whitelist | sed '/^\s*$/d' | wc -l)
|
numberOf=$(cat $whitelist | sed '/^\s*$/d' | wc -l)
|
||||||
plural=; [[ "$numberOf" != "1" ]] && plural=s
|
plural=; [[ "$numberOf" != "1" ]] && plural=s
|
||||||
echo "** Whitelisting $numberOf $whitelist domain${plural}..."
|
echo "** Whitelisting $numberOf domain${plural}..."
|
||||||
|
|
||||||
# Append a "$" to the end, prepend a "^" to the beginning, and
|
# Append a "$" to the end, prepend a "^" to the beginning, and
|
||||||
# replace "." with "\." of each line to turn each entry into a
|
# replace "." with "\." of each line to turn each entry into a
|
||||||
|
|
Loading…
Reference in a new issue