From 81622ae039343d81b7a98a701a5338feb01fb777 Mon Sep 17 00:00:00 2001 From: qo-op Date: Fri, 12 Mar 2021 00:42:27 +0100 Subject: [PATCH] verify ipfs is running --- cron_MINUTE.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index cdd1c7d..b717176 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -17,6 +17,7 @@ source $HOME/.profile #### INIT STATION PARAMETERS export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) +[[ ! $YOU ]] && echo "ERREUR processus ipfs absent" && exit 1 [[ $IPFSNODEID ]] && export IPFSNODEID=$IPFSNODEID || export IPFSNODEID=$(ipfs id -f='\n') ########################################################################