From a7b91e26bab35ed1e43280c2efc4ac97b8a74d11 Mon Sep 17 00:00:00 2001 From: poka Date: Wed, 20 May 2020 02:16:53 +0200 Subject: [PATCH] Fix install --- .install/ipfs_alone.sh | 12 ++++++------ install.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.install/ipfs_alone.sh b/.install/ipfs_alone.sh index cb78c70..2eb19a0 100644 --- a/.install/ipfs_alone.sh +++ b/.install/ipfs_alone.sh @@ -1,6 +1,6 @@ #!/bin/bash ######################################################################## - # this ensures the entire script is downloaded # +{ # this ensures the entire script is downloaded # MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ME="${0##*/}" @@ -75,7 +75,7 @@ EOF sudo cp -f /tmp/ipfs.service /etc/systemd/system/ sudo sed -i "s/_USER_/$USER/g" /etc/systemd/system/ipfs.service - + sudo systemctl daemon-reload || err "Restart IPFS" sudo systemctl enable ipfs || err "Enable IPFS daemon" @@ -89,7 +89,7 @@ sudo chown -R $USER:$USER ~/.ipfs || exit 1 ########################################### # ACTIVATE IPFS OPTIONS: #swarm0 INIT ########################################### -### IMPORTANT !!!!!!! IMPORTANT !!!!!! +### IMPORTANT !!!!!!! IMPORTANT !!!!!! ########################################### # DHT PUBSUB mode ipfs config Pubsub.Router gossipsub @@ -111,7 +111,7 @@ sudo systemctl start ipfs || err "Start IPFS daemon" sleep 7 -echo "Peers: " && ipfs swarm peers && sleep 1 -[[ $(ipfs swarm peers) == "" ]] && err "No peers found in swarm. Please open issue :https://git.p2p.legal/axiom-team/astroport/issues" +echo "Peers: " && ipfs swarm peers && sleep 0.3 +[[ -z $(ipfs swarm peers) ]] && err "No peers found in swarm. Please open issue :https://git.p2p.legal/axiom-team/astroport/issues" - # this ensures the entire script is downloaded # +} # this ensures the entire script is downloaded # diff --git a/install.sh b/install.sh index 4456884..65aae6f 100644 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ echo "${c_green}Astroport installer ### 1. IPFS Swarm Layer$c_" # Full automatic (you trust this git depot) -curl -s $gitpath/.install/ipfs_alone.sh | bash # || exit 1 +curl -s $gitpath/.install/ipfs_alone.sh | bash || exit 1 # Set environment variables curl -s $gitpath/.install/sys_checkOS.sh noexec | bash || exit 1