fix ipfs install

This commit is contained in:
poka 2020-05-17 20:48:50 +02:00
parent 6502cde0a0
commit 09e8cca92c
1 changed files with 7 additions and 6 deletions

View File

@ -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