Included a custom adlist file

under /etc/removeadhosts/ is a file called adlist.txt, here you can add
any custom url to be added to the block list
stable
Justin Reichardt 2021-08-02 16:45:48 -05:00
parent e4b7393fca
commit 1bd5822561
2 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,8 @@
dir:
mkdir -p /usr/local/share/removeadhosts
install: dir
mkdir /etc/removeadhosts
touch /etc/removeadhosts/ads.txt
cp src/* /usr/local/share/removeadhosts/
chown -R root:root /usr/local/share/removeadhosts
chmod +x /usr/local/share/removeadhosts/removeadhosts.sh
@ -15,5 +17,7 @@ deactivate:
remove: deactivate
rm -f /etc/systemd/system/removeadhosts*
rm -fr /usr/local/share/removeadhosts/
purge: remove
rm -fr /etc/removeadhosts
reinstall: remove activate

View File

@ -14,3 +14,12 @@ fi
echo 'Downloading ad list'
curl https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts 2>/dev/null | tee -a /etc/hosts >/dev/null
echo 'Adding custom items from /etc/removeadhosts'
if [ -e /etc/removeadhosts/adlist.txt ]
then
cat /etc/removeadhosts/adlist.txt | \
while read CMD; do
echo "0.0.0.0 $CMD" >> /etc/hosts
done
fi