From d53b17d189a112685b77ab2e1bb0a1e79d8e8858 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sat, 15 Apr 2017 16:33:48 +0200 Subject: [PATCH] print when we fail to fetch a url --- randrss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/randrss b/randrss index da39bf8..9892ad0 100755 --- a/randrss +++ b/randrss @@ -1,7 +1,7 @@ #!/bin/bash set -x set -e -random_default=$( shuf -n 1 -i7200-7523) +random_default=$( shuf -n 1 -i720-753) DEFAULT_PER_ITEM="1-$random_default" echo "Current default sleep seconds range: $DEFAULT_PER_ITEM" @@ -31,6 +31,6 @@ while true ; do fi echo "Sleeping for $sleepfor seconds for $url" sleep "$sleepfor" - torsocks wget "$url" -U "$useragent" -O "$output" + torsocks wget "$url" -U "$useragent" -O "$output" || echo "Failed to fetch $url" done done