From f277c215d5aa5886811d0b9980712bf91405ab1b Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 23 Sep 2021 02:14:19 +0200 Subject: [PATCH] rm /config/ipfs/repo.lock --- cron_MINUTE.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index a9f60c7..686e2b1 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -25,7 +25,7 @@ howmany=$(cat /tmp/ipfs.timeout) if [[ ! $IPFSNODEID ]]; then ## wait a howmany timeout before restarting ipfs howmany=$((howmany + 1)) && echo $howmany > /tmp/ipfs.timeout - [ $howmany -gt 3 ] && [[ -f /etc/sudoers.d/systemctl ]] && echo "IPFS NOT RUNNING $(date) $(ps auxf)" >> ~/.zen/restart.txt && rm /tmp/ipfs.timeout && sudo systemctl restart ipfs + [ $howmany -gt 3 ] && [[ -f /etc/sudoers.d/systemctl ]] && echo "IPFS NOT RUNNING $(date) $(ps auxf)" >> ~/.zen/restart.txt && rm /tmp/ipfs.timeout && rm /config/ipfs/repo.lock && sudo systemctl restart ipfs [ $howmany -gt 3 ] && [[ "${USER}" == "xbian" ]] && echo "IPFS NOT RUNNING" && sudo service ipfs restart && exit 1 exit 1 else @@ -115,6 +115,8 @@ if [[ $(($runtime % 4)) == 0 ]]; then for g1pub in $(ls -t ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/); do [[ $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 + ## AVERAGE PING cat ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/*/ping.average.txt + # for line in $(ls ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/*/ping.average.txt); do g1friend=$(echo $line | cut -d '/' -f 8); ipfsnodeid=$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $g1friend); cat ~/.zen/ipfs_swarm/.$ipfsnodeid/_xbian.zuid; cat $line; done done fi ########################################################################