restart ipfs if not running
This commit is contained in:
parent
f637cabecc
commit
194790b3bf
|
@ -19,7 +19,11 @@ rm -f ~/.zen/A_swarm_map.txt && touch ~/.zen/A_swarm_map.txt
|
||||||
# ENVIRONEMENT DETECTION + IPFS ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_info
|
# ENVIRONEMENT DETECTION + IPFS ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_info
|
||||||
########################################################################
|
########################################################################
|
||||||
isIPFSRunning=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1)
|
isIPFSRunning=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1)
|
||||||
[[ ! $isIPFSRunning ]] && echo "ERROR! ipfs daemon is not running. EXIT" && exit 1
|
if [[ ! $isIPFSRunning ]]; then
|
||||||
|
[[ -f /etc/sudoers.d/systemctl ]] && sudo systemctl restart ipfs
|
||||||
|
echo "ERROR! ipfs daemon is not running. EXIT"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
# Force Strict #swarm0 !!?
|
# Force Strict #swarm0 !!?
|
||||||
|
|
Loading…
Reference in New Issue