ping friends every 4 minutes

This commit is contained in:
fred 2021-08-06 00:36:11 +02:00
parent 5c1566bceb
commit b93c95fbde
1 changed files with 6 additions and 3 deletions

View File

@ -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
########################################################################