Add ssb-server to OASIS

This commit is contained in:
qo-op 2020-05-28 17:27:27 +02:00
parent 681ae26d26
commit f1dc8af4e1
1 changed files with 9 additions and 2 deletions

View File

@ -107,12 +107,13 @@ if [[ ! $(which oasis) ]]; then
export NVM_DIR="$HOME/.nvm"
nvm install --lts
fi
npm install -g sodium-native ssb-backlinks ssb-ws ssb-links ssb-query ssb-secret-blob ssb-private
npm -g install sodium-native ssb-backlinks ssb-ws ssb-links ssb-query ssb-secret-blob ssb-private
npm -g install fraction/oasis#semver:
npm -g install ssb-server ## ADD SSB-SERVER FOR PRIVATE SSB MESSAGING (TODO: integrate Feedless modules on LOVELand Portal)
else
echo "Stopping OASIS"
kill -9 $(ps auxf --sort=+utime | grep -w oasis | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}')
kill -9 $(ps auxf --sort=+utime | grep -w ssb-server | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}')
fi
@ -242,7 +243,8 @@ sleep 1
# CREATE ~/.ssb/secret.dunikey
python3 ~/.zen/astroport/zen/tools/key_create_dunikey.py "$salt" "$pepper"
sleep 1
[[ -f /tmp/secret.dunikey ]] && rm -f ~/.ssb/secret.dunikey && mv /tmp/secret.dunikey ~/.ssb/secret.dunikey || exit 1
[[ ! -f /tmp/secret.dunikey ]] && echo "AARRRRGGG problem happens making your secret.dunikey" && exit 1
[[ -f /tmp/secret.dunikey ]] && rm -f ~/.ssb/secret.dunikey && mv /tmp/secret.dunikey ~/.ssb/secret.dunikey
# CREATE SSB secret
g1pub=$(cat ~/.ssb/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
@ -319,6 +321,11 @@ ACTIVATE METAVERSE #SWARM0 INIT SEQUENCE...
ALPHA - ALPHA - ALPHA - ALPHA
'
echo "Starting SSB SERVER... wait 10 seconds..."
ssb-server start &
sleep 10
echo "Starting OASIS..."
oasis --allow-host $nodename --host $nodename &