forked from axiom-team/astrXbian
rm /config/ipfs/repo.lock
This commit is contained in:
parent
1a1cfab4cc
commit
f277c215d5
|
@ -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
|
||||
########################################################################
|
||||
|
|
Loading…
Reference in New Issue