Improve install
This commit is contained in:
parent
5395fe8514
commit
253bdbc0f4
43
install.sh
43
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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue