Add iptubes install
This commit is contained in:
parent
0f160a7dda
commit
3ceaf5531c
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
# Install ScuttleButt
|
||||
scuttlebutt() {
|
||||
|
||||
}
|
||||
|
||||
# Install IPTubes
|
||||
iptubes() {
|
||||
cd $ASTROPATH/iptubes
|
||||
## Install GO
|
||||
wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
|
||||
sudo tar -C /usr/local -xzf go1.13.4.linux-amd64.tar.gz
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
source ~/.profile
|
||||
|
||||
## Install torrengo
|
||||
go get github.com/juliensalinas/torrengo
|
||||
go build github.com/juliensalinas/torrengo
|
||||
go get github.com/juliensalinas/torrengo/ygg
|
||||
|
||||
sudo mv torrengo /usr/bin
|
||||
sudo cd /usr/bin
|
||||
sudo chmod ug+x torrengo
|
||||
}
|
||||
|
||||
# Check installs
|
||||
## Check IPFS install
|
||||
[[ $force_req == "o" || -z $(which ipfs) ]] && ipfs
|
||||
|
||||
|
||||
echo -e "Installation Complete"
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue