Browse Source

LOG "IPFS NOT RUNNING $(date)" >> ~/.zen/restart.txt

pull/38/head
fred 3 months ago
parent
commit
6e77095ff5
  1. 2
      cron_MINUTE.sh

2
cron_MINUTE.sh

@ -21,7 +21,7 @@ source $HOME/.profile
#### CONTROL STATION IPFS DAEMON
## timeout is fixing ipfs minimum response time, before considering stuck process
IPFSNODEID=$(ipfs --timeout=30s id -f='<id>\n')
[[ ! $IPFSNODEID && -f /etc/sudoers.d/systemctl ]] && echo "IPFS NOT RUNNING" && sudo systemctl restart ipfs && exit 1
[[ ! $IPFSNODEID && -f /etc/sudoers.d/systemctl ]] && echo "IPFS NOT RUNNING $(date)" >> ~/.zen/restart.txt && sudo systemctl restart ipfs && exit 1
[[ ! $IPFSNODEID && "${USER}" == "xbian" ]] && echo "IPFS NOT RUNNING" && sudo service ipfs restart && exit 1
## CONTROL IPFS IS RUNNING OR RESTART
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)

Loading…
Cancel
Save