Browse Source

xbian first

pull/38/head
fred 4 weeks ago
parent
commit
1cf80f7d52
  1. 5
      cron_MINUTE.sh

5
cron_MINUTE.sh

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

Loading…
Cancel
Save