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(){
|
function gravity_Blacklist(){
|
||||||
# Append blacklist entries if they exist
|
# Append blacklist entries if they exist
|
||||||
if [[ -r $blacklist ]];then
|
blacklist.sh -f -nr -q
|
||||||
numberOf=$(cat $blacklist | sed '/^\s*$/d' | wc -l)
|
|
||||||
echo "** Blacklisting $numberOf domain(s)..."
|
|
||||||
cat $blacklist >> $piholeDir/$matterandlight
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function gravity_Whitelist() {
|
function gravity_Whitelist() {
|
||||||
|
|
||||||
# Prevent our sources from being pulled into the hole
|
# Prevent our sources from being pulled into the hole
|
||||||
plural=; [[ "${sources[@]}" != "1" ]] && plural=s
|
plural=; [[ "${sources[@]}" != "1" ]] && plural=s
|
||||||
echo "** Whitelisting ${sources[@]} ad list source${plural}..."
|
echo "** Whitelisting ${#sources[@]} ad list source${plural}..."
|
||||||
|
|
||||||
urls=()
|
urls=()
|
||||||
for url in ${sources[@]}
|
for url in ${sources[@]}
|
||||||
do
|
do
|
||||||
tmp=$(echo "$url" | awk -F '/' '{print $3}' | sed 's/\./\\./g')
|
tmp=$(echo "$url" | awk -F '/' '{print $3}')
|
||||||
urls=("${urls[@]}" $tmp)
|
urls=("${urls[@]}" $tmp)
|
||||||
done
|
done
|
||||||
|
|
||||||
whitelist.sh -f -dr ${urls[@]}
|
whitelist.sh -f -nr -q ${urls[@]}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue