From 2284a27814e48c1f6d6b80379d03ec56a376ad3e Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 15 Jan 2016 15:54:11 +0000 Subject: [PATCH] Consumes blacklist.sh now, too. --- gravity.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gravity.sh b/gravity.sh index 28a2c61a..2ee4ca33 100755 --- a/gravity.sh +++ b/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[@]} }