mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Consumes blacklist.sh now, too.
This commit is contained in:
parent
f68cf10efa
commit
2284a27814
12
gravity.sh
12
gravity.sh
@ -169,27 +169,23 @@ function gravity_Schwarzchild() {
|
||||
|
||||
function gravity_Blacklist(){
|
||||
# Append blacklist entries if they exist
|
||||
if [[ -r $blacklist ]];then
|
||||
numberOf=$(cat $blacklist | sed '/^\s*$/d' | wc -l)
|
||||
echo "** Blacklisting $numberOf domain(s)..."
|
||||
cat $blacklist >> $piholeDir/$matterandlight
|
||||
fi
|
||||
blacklist.sh -f -nr -q
|
||||
}
|
||||
|
||||
function gravity_Whitelist() {
|
||||
|
||||
# Prevent our sources from being pulled into the hole
|
||||
plural=; [[ "${sources[@]}" != "1" ]] && plural=s
|
||||
echo "** Whitelisting ${sources[@]} ad list source${plural}..."
|
||||
echo "** Whitelisting ${#sources[@]} ad list source${plural}..."
|
||||
|
||||
urls=()
|
||||
for url in ${sources[@]}
|
||||
do
|
||||
tmp=$(echo "$url" | awk -F '/' '{print $3}' | sed 's/\./\\./g')
|
||||
tmp=$(echo "$url" | awk -F '/' '{print $3}')
|
||||
urls=("${urls[@]}" $tmp)
|
||||
done
|
||||
|
||||
whitelist.sh -f -dr ${urls[@]}
|
||||
whitelist.sh -f -nr -q ${urls[@]}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user