From 09e8cca92c98540e168b1b08f0f1782b1b913dc3 Mon Sep 17 00:00:00 2001 From: poka Date: Sun, 17 May 2020 20:48:50 +0200 Subject: [PATCH] fix ipfs install --- .install/ipfs_alone.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.install/ipfs_alone.sh b/.install/ipfs_alone.sh index 99fa538..8b48abd 100644 --- a/.install/ipfs_alone.sh +++ b/.install/ipfs_alone.sh @@ -22,11 +22,13 @@ err() { } # CHECK if daemon is already running -[[ $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) ]] \ -&& echo "ipfs daemon already running...! Must STOP ipfs AND remove ~/.ipfs to install again !!" \ -&& ipfs id && echo "ipfs swarm peers" && ipfs swarm peers \ -&& echo "ipfs bootstrap list" && ipfs bootstrap list \ -&& echo "Please RUN : sudo systemctl stop ipfs" && exit 0 +if [[ $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) ]]; then + echo "ipfs daemon already running...! Must STOP ipfs AND remove ~/.ipfs to install again !!" + ipfs id && echo "ipfs swarm peers: " && ipfs swarm peers + echo "ipfs bootstrap list: " && ipfs bootstrap list + echo "Please RUN : sudo systemctl stop ipfs" + exit 1 +fi [[ -d ~/.ipfs ]] && echo "IPFS install exist! Please remove or backup before executing this script" && exit 1 @@ -103,7 +105,6 @@ ipfs bootstrap add /ip6/fd42:feed:feed:feed::1/tcp/4001/p2p/Qmb6Gyy3KFWTxWh4v6fB sudo systemctl start ipfs || err "Start IPFS daemon" - sleep 7 [[ ! $(ipfs swarm peers) ]] && err "No peers found in swarm. Please open issue :https://git.p2p.legal/axiom-team/astroport/issues" || exit 1