From 2e50939e86a66f34f16ed022e4f9e73a48fef9db Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 23 Sep 2021 03:37:51 +0200 Subject: [PATCH] ipfs swarm connect $line 2>&1>/dev/null && swarmping="OK" || swarmping="NOK" --- zen/gchange_IPFS_swarm.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zen/gchange_IPFS_swarm.sh b/zen/gchange_IPFS_swarm.sh index 537cfcf..b1630f4 100755 --- a/zen/gchange_IPFS_swarm.sh +++ b/zen/gchange_IPFS_swarm.sh @@ -75,9 +75,10 @@ do ipfsnodeid=$(echo $line | rev | cut -d '/' -f 1 | rev) stationip=$(echo $line | cut -d '/' -f 3) ping -c 1 -W 1 $stationip 2>&1>/dev/null && sping="OK" || sping="NOK" - echo "## $sping PING $stationip STATION $ipfsnodeid" + ipfs swarm connect $line 2>&1>/dev/null && swarmping="OK" || swarmping="NOK" + echo "## ping $stationip : $sping / STATION $ipfsnodeid ($swarmping)" [[ $ipfsnodeid == "" ]] && break - [[ ! $(cat /tmp/ipfstryme.clean | grep $ipfsnodeid) ]] && echo $line >> /tmp/ipfstryme.clean + [[ ! $(cat /tmp/ipfstryme.clean | grep $ipfsnodeid) ]] && [[ "$swarmping" == "OK" ]] && echo $line >> /tmp/ipfstryme.clean done cat /tmp/ipfstryme.clean | sort | uniq > /tmp/ipfstryme.$liking_me