add 1st bootstrap

This commit is contained in:
qo-op 2020-05-09 21:34:28 +02:00
parent a53aece7eb
commit b7e3cd3747
4 changed files with 7 additions and 8 deletions

View File

@ -9,7 +9,8 @@ ME="${0##*/}"
[[ $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) ]] \
&& echo "ipfs daemon already running. EVERYTHING OK!" \
&& ipfs id && echo "ipfs swarm peers" && ipfs swarm peers \
&& echo "ipfs bootstrap list" && ipfs bootstrap list && exit 0
&& echo "ipfs bootstrap list" && ipfs bootstrap list \
&& echo "Please RUN : sudo systemctl stop ipfs" && exit 0
# CHECK not root user !!
if [ "$EUID" -eq 0 ]
@ -21,8 +22,6 @@ fi
[[ -d ~/.ipfs ]] && echo "IPFS install exist, please remove backup before execute this script" && exit 1
echo -e "${c_yellow}Onboarding IPFS...$c_"
[[ -f /usr/local/bin/ipfs ]] && sudo service ipfs stop
MACHINE_TYPE=`uname -m`
[ ${MACHINE_TYPE} == 'x86_64' ] && 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"
@ -64,6 +63,7 @@ ipfs config --json Experimental.Libp2pStreamMounting true
######### UPDATE BOOTSTRAP LIST ###########
ipfs bootstrap rm --all
ipfs bootstrap add /dnsaddr/rec.copylaradio.com/tcp/4001/ipfs/Qmb6Gyy3KFWTxWh4v6fBeh5ANxAF6YAahWQtokmsNsqGda
sudo systemctl restart ipfs || err+="Restart IPFS daemon"
} # this ensures the entire script is downloaded #

View File

@ -23,7 +23,7 @@ scuttlebutt() {
cd ~/.ssb
### Install module
npm install sodium-native ssb-backlinks ssb-ws ssb-links ssb-query ssb-secret-blob ssb-private
npm install -g sodium-native ssb-backlinks ssb-ws ssb-links ssb-query ssb-secret-blob ssb-private
npm install -g ssb-server
# TODO plugin activation !??

View File

@ -87,7 +87,7 @@ export PATH=$PATH:~/.local/bin
if [[ ! $(which silkaj) ]]; then
sudo apt update || true
libzzz=$(sudo apt-cache search libsodium | awk '{print $1}' | grep libsodium2)
sudo apt install libffi-dev build-essential qrencode jq bc $libzzz -y
sudo apt install libffi-dev build-essential qrencode jq bc gawk $libzzz -y
sudo apt install python3-pip python3-setuptools python3-wheel -y
sudo pip3 install base58
pip3 install silkaj --user

View File

@ -442,9 +442,8 @@ branch: $msg_branch
echo "$MESSAGE"
INLINE=$(node -p "JSON.stringify(process.env.MESSAGE)")
# TODO: Remove coma replacing space
# echo '{"type":"post", "branch": "'"$msg_branch"'", "root": "'"$msg_root"'", "text":'${INLINE}',"mentions":[{"link":"'"$id"'","name":"'"$name"'","size":"'"$size"'","type":"'"$type"'"},{"link":"#zenbot"},{"link":"#astroport"}]}'
sbotc publish '{"type":"post", "branch": "'"$msg_branch"'", "root": "'"$msg_root"'", "text":'${INLINE}',"mentions":[{"link":"'"$id"'","name":"'"$name"'","size":"'"$size"'","type":"'"$type"'"},{"link":"#zenbot"},{"link":"#astroport"}]}'
# echo '{"type":"post", "branch": "'"$msg_branch"'", "root": "'"$msg_root"'", "text":"'"${INLINE}"'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":"'"$size"'","type":"'"$type"'"},{"link":"#zenbot"},{"link":"#astroport"}]}'
sbotc publish '{"type":"post", "branch": "'"$msg_branch"'", "root": "'"$msg_root"'", "text":"'"${INLINE}"'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":"'"$size"'","type":"'"$type"'"},{"link":"#zenbot"},{"link":"#astroport"}]}'
else