This commit is contained in:
qo-op 2020-04-30 02:51:50 +02:00
parent f7acc359c7
commit c2766585d4
2 changed files with 53 additions and 43 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
ipfs() {
# Install IPFS
MY_PATH="`dirname \"$0\"`" # relative
@ -18,6 +18,8 @@ fi
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
@ -34,18 +36,13 @@ fi
echo "INSTALL latest ipfs"
sudo ipfs-update install latest || err+="Install IPFS"
if [[ ! -f /etc/systemd/system/ipfs.service ]]; then
echo "CREATE SYSTEMD ipfs SERVICE"
sudo cp -f $templates/ipfs.service /etc/systemd/system/
sudo sed -i "s/_USER/$USER/g" /etc/systemd/system/ipfs.service
fi
sudo systemctl daemon-reload || err+="Restart IPFS"
sudo systemctl enable ipfs || err+="Enable IPFS daemon"
################
# BECOME $USER
# INIT ipfs
ipfs init -p lowpower
# ipfs init -p server ## Uncomment for server infrastructure
@ -63,7 +60,10 @@ fi
######### UPDATE BOOTSTRAP LIST ###########
ipfs bootstrap rm --all
sudo systemctl daemon-reload || err+="Restart IPFS"
sudo systemctl restart ipfs || err+="Restart IPFS daemon"
exit 0
}
$@

View File

@ -25,13 +25,23 @@ __) _|_ |_ |\ /--\ \_|
mkdir -p ~/.zen
sudo apt update || true
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 apt install python3-pip python3-setuptools python3-wheel -y
pip3 install silkaj --user
echo 'PATH=$PATH:~/.local/bin' >> ~/.bashrc && source ~/.bashrc
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
echo "ScuttleButt is already installed...??"