From a13890d197c714d0d96b9e4233eb737fdca0d950 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 8 Jul 2021 13:34:32 +0200 Subject: [PATCH] MAJ --- cron_MINUTE.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index fcdff26..1516036 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -19,7 +19,8 @@ source $HOME/.profile [[ ! $(echo $PATH | grep "/usr/games") ]] && export PATH="$PATH:/usr/games" #### INIT STATION PARAMETERS -IPFSNODEID=$(ipfs --timeout=10s id -f='\n') && [[ -f /etc/sudoers.d/systemctl ]] && sudo systemctl restart ipfs && exit 1 +IPFSNODEID=$(ipfs --timeout=10s id -f='\n') +[[ ! $IPFSNODEID ]] && echo "IPFS NOT RUNNING" && [[ -f /etc/sudoers.d/systemctl ]] && sudo systemctl restart ipfs && exit 1 ## CONTROL IPFS IS RUNNING OR RESTART isIPFSRunning=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1) if [[ ! $isIPFSRunning ]]; then