verify ipfs is running & responding

This commit is contained in:
qo-op 2021-07-08 07:22:56 +02:00
parent 67650ff228
commit c3d7706bc9
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ source $HOME/.profile
[[ ! $(echo $PATH | grep "/usr/games") ]] && export PATH="$PATH:/usr/games"
#### INIT STATION PARAMETERS
[[ $IPFSNODEID ]] && export IPFSNODEID=$IPFSNODEID || export IPFSNODEID=$(ipfs id -f='<id>\n')
IPFSNODEID=$(ipfs --timeout=10s id -f='<id>\n') && [[ -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