#!/bin/bash scuttlebutt() { echo -e "${c_yellow}Onboarding SCUTTLEBUTT...$c_" where_is_ssb_installed=$(which ssb-server) # Install npm_modules in ~/.zen/fatlayer_install mkdir -p ~/.zen/fatlayer_install BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" if [[ $where_is_ssb_installed == "" ]]; then cd ~/.zen/fatlayer_install # Install dependencies sudo apt-get install -y socat python3-dev libtool python3-setuptools autoconf automake # Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash source ~/.bashrc nvm install --lts # Install sbot-server npm install sodium-native ssb-backlinks ssb-ws ssb-links ssb-query npm install -g ssb-server fi # test Install ssbSERVER=$(which ssb-server) [[ $ssbSERVER == "" ]] && echo "Check your ssb-server install... Cannot find it !!" && exit 1 # BACKUP OLD SSB [[ -d ~/.ssb ]] && mv ~/.ssb ~/.ssb.$USER # BACKUP OLD SSB # MAKE A LINK ~/.ssb.astroport to ~/.ssb mkdir ~/.ssb.astroport ln -s ~/.ssb.astroport ~/.ssb # Create config (TODO: adapt if public Pub or Local Node) nodename=$(cat /etc/hostname) extension=$($(echo $nodename | cut -d '.' -f 2)) if [[ $extension == "" ]]; then nodename=$(echo $nodename).home # LOCAL cat > ~/.ssb/config < ~/.ssb/config <