From cc9aa1e3a93498b75dfc119a779bed6da3148a87 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Sun, 19 Feb 2023 06:36:20 +0100 Subject: [PATCH] architect: Removed scripts --- .../architect/scripts/fetch-adblock-hosts.sh | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 hosts/architect/scripts/fetch-adblock-hosts.sh diff --git a/hosts/architect/scripts/fetch-adblock-hosts.sh b/hosts/architect/scripts/fetch-adblock-hosts.sh deleted file mode 100644 index 67416e1..0000000 --- a/hosts/architect/scripts/fetch-adblock-hosts.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -EASYLIST_HOSTSNAME="easylist_hosts.txt" -EASYPRIVACY_HOSTSNAME="easyprivacy_hosts.txt" -STEVENBLACK_HOSTSNAME="stevenblack_hosts.txt" - -get_easylist() { - EASYLIST_URL="https://raw.githubusercontent.com/easylist/easylist/master/easylist/easylist_adservers.txt" - - tmpfile=`mktemp` - - # download easylist - ${pkgs.wget}/bin/wget $EASYLIST_URL -O $tmpfile - - # remove IP addresses and prepend 0.0.0.0 to create hosts file - - cat $tmpfile | egrep -v "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -oP "^\|\|(\K[a-zA-Z0-9\.\-]+)" | ${pkgs.gawk}/bin/gawk '{print "0.0.0.0 " $0}' > $EASYLIST_HOSTSNAME -} - -get_easyprivacy() { - EASYLIST_URL="https://raw.githubusercontent.com/easylist/easylist/master/easyprivacy/easyprivacy_trackingservers.txt" - - tmpfile=`mktemp` - - # download easylist - ${pkgs.wget}/bin/wget $EASYLIST_URL -O $tmpfile - - # remove IP addresses and prepend 0.0.0.0 to create hosts file - - cat $tmpfile | egrep -v "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -oP "^\|\|(\K[a-zA-Z0-9\.\-]+)" | ${pkgs.gawk}/bin/gawk '{print "0.0.0.0 " $0}' > $EASYPRIVACY_HOSTSNAME -} - -get_stevenblack() { - STEVENBLACK_URL="https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts" - - ${pkgs.wget}/bin/wget $STEVENBLACK_URL -O $STEVENBLACK_HOSTSNAME -} - - -get_easylist -get_easyprivacy -get_stevenblack - - -# create unified file - -cat *hosts.txt | sort | uniq | grep "^0" > /etc/adblock_hosts - -rm $EASYLIST_HOSTSNAME $STEVENBLACK_HOSTSNAME