Browse Source

ipfs swarm connect $line 2>&1>/dev/null && swarmping="OK" || swarmping="NOK"

pull/38/head
fred 2 months ago
parent
commit
2e50939e86
  1. 5
      zen/gchange_IPFS_swarm.sh

5
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

Loading…
Cancel
Save