From 69a88219a197e3f1970f7efa1b2fc5def320a843 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 25 Aug 2021 10:32:53 +0200 Subject: [PATCH] elif [ ${MACHINE_TYPE} == 'aarch64' ]; then --- .install/ipfs_alone.sh | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.install/ipfs_alone.sh b/.install/ipfs_alone.sh index 89649a7..3e3f5c7 100755 --- a/.install/ipfs_alone.sh +++ b/.install/ipfs_alone.sh @@ -44,19 +44,30 @@ if [ ${MACHINE_TYPE} == 'x86_64' ]; then curl -s https://dist.ipfs.io/ipfs-update/v1.6.0/ipfs-update_v1.6.0_linux-amd64.tar.gz -o $MY_PATH/ipfs-update.tar.gz elif [ ${MACHINE_TYPE:0:3} == 'arm' ]; then curl -s https://dist.ipfs.io/ipfs-update/v1.6.0/ipfs-update_v1.6.0_linux-arm.tar.gz -o $MY_PATH/ipfs-update.tar.gz +elif [ ${MACHINE_TYPE} == 'aarch64' ]; then + curl -s https://github.com/ipfs/go-ipfs/releases/download/v0.9.1/go-ipfs_v0.9.1_linux-arm64.tar.gz -o /tmp/ipfs_aarch64_v0.9.1.tar.gz else - [ ! -f $MY_PATH/ipfs-update.tar.gz ] && err "Your $MACHINE_TYPE is not supported yet... Please add an issue." + echo "Your $MACHINE_TYPE is not supported yet... Please add an issue." && exit 1 fi -echo "INSTALL ipfs-update >>>>>>>>>>>>>>>>>>>>>>>>>>" -sudo tar -xvzf $MY_PATH/ipfs-update.tar.gz -C /usr/src/ || err "Untar ipfs-update" -rm $MY_PATH/ipfs-update.tar.gz -cd /usr/src/ipfs-update/ -sudo ./install.sh || err "Install ipfs-update" -cd $MY_PATH +if [ -f $MY_PATH/ipfs-update.tar.gz ]; then + echo "INSTALL ipfs-update >>>>>>>>>>>>>>>>>>>>>>>>>>" + sudo tar -xvzf $MY_PATH/ipfs-update.tar.gz -C /usr/src/ || err "Untar ipfs-update" + rm $MY_PATH/ipfs-update.tar.gz + cd /usr/src/ipfs-update/ + sudo ./install.sh || err "Install ipfs-update" + cd $MY_PATH -echo "INSTALL ipfs 0.7.0 >>>>>>>>>>>>>>>>>>>>>>>>>>" -sudo ipfs-update install 0.7.0 || err "Install IPFS" + echo "INSTALL ipfs 0.7.0 >>>>>>>>>>>>>>>>>>>>>>>>>>" + sudo ipfs-update install 0.7.0 || err "Install IPFS" +else + ## TERRAPI4 aarch64 install ipfs_aarch64_v0.9.1 + sudo tar -xvzf /tmp/ipfs_aarch64_v0.9.1.tar.gz -C /usr/src/ || err "Untar ipfs_aarch64" + rm /tmp/ipfs_aarch64_v0.9.1.tar.gz + cd /usr/src/go-ipfs/ + sudo ./install.sh || err "Install ipfs_aarch64" + cd $MY_PATH +fi # INIT ipfs [[ $isLAN ]] && ipfs init -p lowpower \ @@ -109,8 +120,8 @@ ipfs config Datastore.StorageMax $diskSize ## Activate Rapid "ipfs p2p" ipfs config --json Experimental.Libp2pStreamMounting true ipfs config --json Experimental.P2pHttpProxy true -ipfs config --json Swarm.ConnMgr.LowWater 200 -ipfs config --json Swarm.ConnMgr.HighWater 400 +ipfs config --json Swarm.ConnMgr.LowWater 60 +ipfs config --json Swarm.ConnMgr.HighWater 180 ######### CLEAN DEFAULT BOOTSTRAP TO STAY INVISIBLE ########### ipfs bootstrap rm --all ###########################################