sbotc
This commit is contained in:
parent
f7acc359c7
commit
c2766585d4
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
ipfs() {
|
||||||
# Install IPFS
|
# Install IPFS
|
||||||
|
|
||||||
MY_PATH="`dirname \"$0\"`" # relative
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
|
@ -18,6 +18,8 @@ fi
|
||||||
|
|
||||||
echo -e "${c_yellow}Onboarding IPFS...$c_"
|
echo -e "${c_yellow}Onboarding IPFS...$c_"
|
||||||
[[ -f /usr/local/bin/ipfs ]] && sudo service ipfs stop
|
[[ -f /usr/local/bin/ipfs ]] && sudo service ipfs stop
|
||||||
|
|
||||||
|
|
||||||
if [[ $ARM == "yes" ]]; then
|
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"
|
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
|
else
|
||||||
|
@ -34,18 +36,13 @@ fi
|
||||||
echo "INSTALL latest ipfs"
|
echo "INSTALL latest ipfs"
|
||||||
sudo ipfs-update install latest || err+="Install IPFS"
|
sudo ipfs-update install latest || err+="Install IPFS"
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -f /etc/systemd/system/ipfs.service ]]; then
|
|
||||||
|
|
||||||
echo "CREATE SYSTEMD ipfs SERVICE"
|
echo "CREATE SYSTEMD ipfs SERVICE"
|
||||||
sudo cp -f $templates/ipfs.service /etc/systemd/system/
|
sudo cp -f $templates/ipfs.service /etc/systemd/system/
|
||||||
sudo sed -i "s/_USER/$USER/g" /etc/systemd/system/ipfs.service
|
sudo sed -i "s/_USER/$USER/g" /etc/systemd/system/ipfs.service
|
||||||
fi
|
|
||||||
sudo systemctl daemon-reload || err+="Restart IPFS"
|
sudo systemctl daemon-reload || err+="Restart IPFS"
|
||||||
sudo systemctl enable ipfs || err+="Enable IPFS daemon"
|
sudo systemctl enable ipfs || err+="Enable IPFS daemon"
|
||||||
|
|
||||||
################
|
|
||||||
# BECOME $USER
|
|
||||||
# INIT ipfs
|
# INIT ipfs
|
||||||
ipfs init -p lowpower
|
ipfs init -p lowpower
|
||||||
# ipfs init -p server ## Uncomment for server infrastructure
|
# ipfs init -p server ## Uncomment for server infrastructure
|
||||||
|
@ -63,7 +60,10 @@ fi
|
||||||
######### UPDATE BOOTSTRAP LIST ###########
|
######### UPDATE BOOTSTRAP LIST ###########
|
||||||
ipfs bootstrap rm --all
|
ipfs bootstrap rm --all
|
||||||
|
|
||||||
sudo systemctl daemon-reload || err+="Restart IPFS"
|
sudo systemctl restart ipfs || err+="Restart IPFS daemon"
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
$@
|
||||||
|
|
|
@ -25,13 +25,23 @@ __) _|_ |_ |\ /--\ \_|
|
||||||
mkdir -p ~/.zen
|
mkdir -p ~/.zen
|
||||||
sudo apt update || true
|
sudo apt update || true
|
||||||
libzzz=$(sudo apt-cache search libsodium | awk '{print $1}' | grep libsodium2)
|
libzzz=$(sudo apt-cache search libsodium | awk '{print $1}' | grep libsodium2)
|
||||||
sudo apt install build-essential $libzzz -y
|
sudo apt install build-essential jq $libzzz -y
|
||||||
sudo pip3 install base58
|
sudo pip3 install base58
|
||||||
sudo apt install python3-pip python3-setuptools python3-wheel -y
|
sudo apt install python3-pip python3-setuptools python3-wheel -y
|
||||||
pip3 install silkaj --user
|
pip3 install silkaj --user
|
||||||
echo 'PATH=$PATH:~/.local/bin' >> ~/.bashrc && source ~/.bashrc
|
echo 'PATH=$PATH:~/.local/bin' >> ~/.bashrc && source ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# INSTALL sbotc
|
||||||
|
if [[ ! $(which sbotc) ]]; then
|
||||||
|
cd /tmp
|
||||||
|
sudo apt install libsodium-dev jq -y
|
||||||
|
git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc
|
||||||
|
cd sbotc
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
cd $MY_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -d ~/.ssb ]]; then
|
if [[ -d ~/.ssb ]]; then
|
||||||
echo "ScuttleButt is already installed...??"
|
echo "ScuttleButt is already installed...??"
|
||||||
|
|
Loading…
Reference in New Issue