xbian first

This commit is contained in:
fred 2021-09-25 02:09:30 +02:00
parent e38b4c24c1
commit 1cf80f7d52
1 changed files with 3 additions and 2 deletions

View File

@ -25,8 +25,9 @@ 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 && rm /config/ipfs/repo.lock && sudo systemctl restart ipfs
[ $howmany -gt 3 ] && [[ "${USER}" == "xbian" ]] && echo "IPFS NOT RUNNING" && sudo service ipfs restart && exit 1
[ $howmany -gt 3 ] && [[ "${USER}" == "xbian" ]] && echo "IPFS NOT RUNNING" && rm /tmp/ipfs.timeout && rm /config/ipfs/repo.lock && sudo service ipfs restart && exit 1
[ $howmany -gt 3 ] && [[ -f /etc/sudoers.d/systemctl ]] && echo "IPFS NOT RUNNING $(date)" && rm /tmp/ipfs.timeout && rm /config/ipfs/repo.lock && sudo systemctl restart ipfs
rm ~/.zen/restart.txt
exit 1
else
echo 0 > /tmp/ipfs.timeout