From 495be81f2ec16b9ddd4190f2e1be794cdbbac15b Mon Sep 17 00:00:00 2001 From: Justin Reichardt Date: Mon, 2 Aug 2021 16:54:18 -0500 Subject: [PATCH] Added custom ad listings You can add any url to adlistings.txt in /etc/removeadhosts and it will curl that directly into hosts --- src/removeadhosts.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/removeadhosts.sh b/src/removeadhosts.sh index b724216..af24550 100755 --- a/src/removeadhosts.sh +++ b/src/removeadhosts.sh @@ -13,7 +13,14 @@ fi echo 'Downloading ad list' -curl https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts 2>/dev/null | tee -a /etc/hosts >/dev/null +if [ -e /etc/removeadhosts/adlistings.txt ] +then + cat /etc/removeadhosts/adlistings.txt | \ + while read SITE; do + curl $SITE 2>/dev/null | tee -a /etc/hosts >/dev/null + echo "0.0.0.0 $CMD" >> /etc/hosts + done +fi echo 'Adding custom items from /etc/removeadhosts' if [ -e /etc/removeadhosts/adlist.txt ]