From ea7a00bb9b8f3ef658dff1efe1fa83bac23e806a Mon Sep 17 00:00:00 2001 From: Stephan Geisler Date: Sun, 29 Sep 2019 10:53:42 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eupdate=5Fblocklist.sh=E2=80=9C=20?= =?UTF-8?q?=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update_blocklist.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/update_blocklist.sh b/update_blocklist.sh index 107813e..41df8c4 100644 --- a/update_blocklist.sh +++ b/update_blocklist.sh @@ -89,11 +89,9 @@ while read BLOCKED_IP # stats … if [[ $LOGLEVEL -eq 1 ]] || [[ $LOGLEVEL -eq 2 ]]; then - END=$(date +%s) - RUNTIME=$((END-UNIXTIME)) echo -e; echo -e; echo "stats:----------------------------------" - echo "duration of the process: $(sec_to_time $RUNTIME)" + echo "duration of the process: $(sec_to_time $(expr $(date +%s)-${UNIXTIME}) )" echo "count of IPs in list: $(cat "/tmp/onlinelist.txt" | grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | wc -l)" echo "count of diffs: $(cat "/tmp/blocklist.txt" | grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | wc -l)" echo "added IPs: $countadded"