diff --git a/zen/gchange_IPFS_swarm.sh b/zen/gchange_IPFS_swarm.sh index 513a790..87f571a 100755 --- a/zen/gchange_IPFS_swarm.sh +++ b/zen/gchange_IPFS_swarm.sh @@ -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 ######################################################################## 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 !!?