From a8ebb16437903180c7235cb16c5211b4be6d90dd Mon Sep 17 00:00:00 2001 From: Jack Ivanov Date: Mon, 5 Jun 2017 17:33:03 +0200 Subject: [PATCH] Enable timeouts. Fixes #581 --- roles/dns_adblocking/templates/adblock.sh.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dns_adblocking/templates/adblock.sh.j2 b/roles/dns_adblocking/templates/adblock.sh.j2 index 2356564..28de743 100644 --- a/roles/dns_adblocking/templates/adblock.sh.j2 +++ b/roles/dns_adblocking/templates/adblock.sh.j2 @@ -18,7 +18,7 @@ rm -f $DNSMASQ_BLOCKHOSTS echo 'Downloading hosts lists...' #Download and process the files needed to make the lists (enable/add more, if you want) for url in $BLOCKLIST_URLS; do - wget -qO- "$url" | awk -v r="$ENDPOINT_IP4" '{sub(/^(0.0.0.0|127.0.0.1)/, r)} $0 ~ "^"r' >> "$TEMP" + wget --timeout=2 --tries=3 -qO- "$url" | awk -v r="$ENDPOINT_IP4" '{sub(/^(0.0.0.0|127.0.0.1)/, r)} $0 ~ "^"r' >> "$TEMP" done #Add black list, if non-empty