From 1a1cfab4cc5b0ac327b73cdf90ac4d12214f635e Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 23 Sep 2021 01:01:57 +0200 Subject: [PATCH] quicker ping --- cron_MINUTE.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 2efabf4..a9f60c7 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -113,7 +113,7 @@ if [[ $(($runtime % 4)) == 0 ]]; then ## PING ALL MY FRIENDS TO ENHANCE SWARM CONNECTIVITY echo "## FRIENDS IPFS PINGing" for g1pub in $(ls -t ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/); do - [[ $g1pub ]] && latency=$(ipfs ping --timeout=2s -n 3 /p2p/$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $g1pub 2>/dev/null) 2>/dev/null | grep "Average" | cut -d ':' -f 2); + [[ $g1pub ]] && latency=$(ipfs ping --timeout=1s -n 1 /p2p/$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $g1pub 2>/dev/null) 2>/dev/null | grep "Average" | cut -d ':' -f 2); [[ $latency ]] && echo $latency > ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$g1pub/ping.average.txt done fi