From 8df1f58fc03d286092be0bbfb3c4ca18daa0ec9f Mon Sep 17 00:00:00 2001 From: Ivan Vilata-i-Balaguer Date: Fri, 10 Jun 2016 17:33:05 +0200 Subject: [PATCH] Use simpler netcat command to check server reachability. With the ``-z`` option, netcat just scans and doesn't need redirection tricks to terminate the connection. --- doc/monitor-bitsquare-sn.cron.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/monitor-bitsquare-sn.cron.sh b/doc/monitor-bitsquare-sn.cron.sh index c05b9c047e..aaa76b361c 100755 --- a/doc/monitor-bitsquare-sn.cron.sh +++ b/doc/monitor-bitsquare-sn.cron.sh @@ -6,7 +6,7 @@ # You may drop this under ``/etc/cron.hourly``. # Please make sure that your system can send emails. # -# Requirements: coreutils, torify, netcat, mail. +# Requirements: coreutils, tor, netcat, mail. # # Author: Ivan Vilata-i-Balaguer @@ -30,7 +30,7 @@ wgthuiqn3aoiovbm.onion:8000 failing_seed_nodes='' for sn in $SEED_NODES; do - true | torify nc $(echo "$sn" | tr ':' ' ') > /dev/null 2>&1 + torify nc -z $(echo "$sn" | tr ':' ' ') > /dev/null 2>&1 if [ $? != 0 ]; then failing_seed_nodes="$failing_seed_nodes $sn" fi