From 1cf80f7d5277e4697e0e909acd571b5ff71031f6 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 25 Sep 2021 02:09:30 +0200 Subject: [PATCH] xbian first --- cron_MINUTE.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 3615e8a..3f4f6bb 100755 --- a/cron_MINUTE.sh +++ b/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