From e38b4c24c1746963359de9335f15bc9de164a9b6 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 25 Sep 2021 02:03:33 +0200 Subject: [PATCH] ipfs swarm sync only friends stations with existing ping.average.txt --- zen/ipfs_SWARM_refresh.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zen/ipfs_SWARM_refresh.sh b/zen/ipfs_SWARM_refresh.sh index d70d98e..d21ed7b 100755 --- a/zen/ipfs_SWARM_refresh.sh +++ b/zen/ipfs_SWARM_refresh.sh @@ -115,8 +115,8 @@ do fi fi ################################################################ - ## Refresh bootstrap if XID exists - if [[ "$XID" != "" ]]; then + ## Refresh bootstrap if XID exists AND PING not null + if [[ "$XID" != "" && "$(cat ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$whoisg1/ping.average.txt 2>dev/null)" != "" ]]; then ipfs bootstrap rm "/ipfs/$ipfsnodeid" && ipfs bootstrap add "$peerline" || ipfs bootstrap rm "$peerline" ################################################################