diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 1c4e4f6..4b828c9 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -22,8 +22,8 @@ source $HOME/.profile 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 +YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) +if [[ ! ${YOU} ]]; then [[ -f /etc/sudoers.d/systemctl ]] && sudo systemctl restart ipfs echo "ERROR! ipfs daemon was not running. RELAUNCHING." exit 1 @@ -122,7 +122,9 @@ echo "RUNTIME $runtime mn ($timebar)" # ACTIVATE 15-17 MN "git pull" update if [[ $(($minute % 15)) == 0 ]]; then ########## SMS GUILDE STATION ############## - [[ -d ~/.zen/SMS/ ]] && /home/pi/workspace/bio-dynamie/sms_send_tosend.sh + [[ -d ~/.zen/SMS/ && "$timebar" == "05:30" ]] && /home/${YOU}/workspace/bio-dynamie/sms/_BIODYN.sh ## PREPARE BIODYN SMS + [[ -d ~/.zen/SMS/ ]] && /home/${YOU}/workspace/bio-dynamie/sms_send_tosend.sh + ########## SMS GUILDE STATION ############## ########## DESYNCH SWARM NODE REQUESTS ################# sleep $((1 + RANDOM % 120))