diff --git a/.gitignore b/.gitignore index 25f7b63..88c5893 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ all-adblock.txt header.txt +own-rules.txt .htaccess .htpasswd diff --git a/create-adblock.sh b/create-adblock.sh index ed46f5a..2246024 100755 --- a/create-adblock.sh +++ b/create-adblock.sh @@ -1,12 +1,17 @@ #!/bin/bash cd /var/www/DOMAIN/adblocker/ +#Adblock Listen herunterladen while read p; do wget -qO - $p >> all-adblock.txt done allfilters.txt + +#Header erstellen echo '! Title: Mainboarder kompiliert ! Description: Filters optimized for uBlock, for single list use, deduplicated ! Expires: 2 days @@ -14,6 +19,9 @@ echo '! Title: Mainboarder kompiliert ! Homepage: https://git.mainboarder.de/Public/Adblocker !' > all-adblock.txt -cat header.txt >> all-adblock.txt +#Eigene Regeln hinzufügen +cat own-rules.txt >> all-adblock.txt + +#Duplikate entfernen awk '!seen[$0]++' allfilters.txt >> all-adblock.txt rm allfilters.txt diff --git a/header.txt.template b/own-rules.txt.template similarity index 100% rename from header.txt.template rename to own-rules.txt.template