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 liststable
parent
e4b7393fca
commit
1bd5822561
4
Makefile
4
Makefile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue