From 9c8498e05b8ba210b7f4f7920a1efb4b3c3c34ab Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 23 Sep 2021 00:57:30 +0200 Subject: [PATCH] audit for ipfs restart cause --- cron_MINUTE.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 0f6541a..2efabf4 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)" >> ~/.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 && sudo systemctl restart ipfs [ $howmany -gt 3 ] && [[ "${USER}" == "xbian" ]] && echo "IPFS NOT RUNNING" && sudo service ipfs restart && exit 1 exit 1 else