From b93c95fbde5e2963743693c9b8ce0c16532838ad Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 6 Aug 2021 00:36:11 +0200 Subject: [PATCH] ping friends every 4 minutes --- cron_MINUTE.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 5ae6e8d..e0922ac 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -95,10 +95,13 @@ fi # RUN TIME $runtime echo "RUNTIME $runtime mn ($timebar)" -## PING ALL MY FRIENDS TO ENHANCE SWARM CONNECTIVITY -echo "## FRIENDS IPFS PINGing" -for g1pub in $(ls -t ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/); do [[ $g1pub ]] && ipfs ping --timeout=5s -n 3 /ipfs/$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $g1pub 2>/dev/null) 2>/dev/null; done + +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 ]] && ipfs ping --timeout=5s -n 3 /ipfs/$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $g1pub 2>/dev/null) 2>/dev/null; done +fi ######################################################################## ## CHECK & (RE)ACTIVATE ipfs p2p tunnels ########################################################################