maximum 20s ipfs daemon response time OR restart

This commit is contained in:
fred 2021-09-20 02:53:47 +02:00
parent 4835b4831d
commit 34e5862878
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ source $HOME/.profile
#### CONTROL STATION IPFS DAEMON
## timeout is fixing ipfs minimum response time, before considering stuck process
IPFSNODEID=$(ipfs --timeout=10s id -f='<id>\n')
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
[[ ! $IPFSNODEID && -f /etc/sudoers.d/systemctl ]] && echo "IPFS NOT RUNNING" && 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