From 31f765b160062e81307b332f1a512d17e96f2926 Mon Sep 17 00:00:00 2001 From: poka Date: Thu, 19 Mar 2020 21:33:13 +0100 Subject: [PATCH] Improve install --- install.sh | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/install.sh b/install.sh index 22f4a55..07a2ecd 100644 --- a/install.sh +++ b/install.sh @@ -4,51 +4,24 @@ echo -e "Installing Astroport" # Install IPFS ipfs() { - echo -e "${c_yellow}Onboarding IPFS...$c_" - [[ -f /usr/local/bin/ipfs ]] && sudo service ipfs stop - if [[ $ARM == "yes" ]]; then - wget https://dist.ipfs.io/ipfs-update/v1.5.2/ipfs-update_v1.5.2_linux-arm.tar.gz -O $MY_PATH/ipfs-update.tar.gz || err+="Download ipfs-update" - else - wget https://dist.ipfs.io/ipfs-update/v1.5.2/ipfs-update_v1.5.2_linux-amd64.tar.gz -O $MY_PATH/ipfs-update.tar.gz || err+="Download ipfs-update" - 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 - - echo "INSTALL latest ipfs" - sudo ipfs-update install latest || err+="Install IPFS" - - echo "CREATE SYSTEMD ipfs SERVICE" - [[ -f /etc/systemd/system/ipfs.service ]] && sudo rm /etc/systemd/system/ipfs.service - sudo cp -f $MY_PATH/templates/1/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" + curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/ipfs.sh | bash } # Install ScuttleButt -scuttlebutt() { - +sbotc() { + curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/scuttlebutt.sh | bash } # Install YGGTorrentScraper yggts() { - echo -e "${c_yellow}Installing YGGTorrentScraper...$c_" - [[ -z $(which pip3) ]] && sudo apt install python3-pip - pip3 install yggtorrentscraper + echo -e "${c_yellow}Installing YGGTorrentScraper...$c_" + [[ -z $(which pip3) ]] && sudo apt install python3-pip + pip3 install yggtorrentscraper } - - # Check installs -## Check IPFS install -[[ $force_req == "o" || -z $(which ipfs) ]] && ipfs - +[[ -z $(which ipfs) ]] && ipfs +[[ -z $(pip3 freeze | grep yggtorrentscraper) ]] && sbotc echo -e "Installation Complete"