From dd70bc62ef76f43d71278b241880b7eecde46c3c Mon Sep 17 00:00:00 2001 From: qo-op Date: Wed, 29 Apr 2020 17:05:25 +0200 Subject: [PATCH] install & invite --- .install/scuttlebutt.sh | 6 +++++- install.sh | 2 ++ zen/README.md | 12 ++++++++++++ zen/tools/sbotc-check-invite.sh | 20 ++++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100755 zen/tools/sbotc-check-invite.sh diff --git a/.install/scuttlebutt.sh b/.install/scuttlebutt.sh index 098e8a8..4c041bc 100755 --- a/.install/scuttlebutt.sh +++ b/.install/scuttlebutt.sh @@ -88,7 +88,11 @@ cat > ~/.zen/run-ssb_server.sh < ~/.zen/ssb.pid.bash while true; do - ssb-server start + ssb-server start + # IF ANY PROBLEM CHANGE TO + # ssb-daemon + # MANAGE WITH OASIS http://$nodename:3000 + # oasis --allow-host $nodename --host $nodename echo _! > ~/.zen/ssb.pid done EOF diff --git a/install.sh b/install.sh index 1f53f9c..186d818 100755 --- a/install.sh +++ b/install.sh @@ -83,6 +83,8 @@ while read gate; do fi done <<<$(echo "$apps" | sed -n 1'p' | tr ',' '\n') +## CREATE G1SSB account +$PATH/zen/tools/make_G1SSB_secret.sh ## Run init scipts $PATH/zen/ssb_IPFS_swarm.sh diff --git a/zen/README.md b/zen/README.md index 495ba77..f2bcffe 100644 --- a/zen/README.md +++ b/zen/README.md @@ -1,3 +1,15 @@ +# Explication de la machinerie. + +Each IPFS Node publish on it's onw IPFS address ~/.zen/ipfs directory. +It contains per channel/wallets credentials and properties (each unique). +.Qm*** sub directory is used for exchanging messages between peers +SSB is the source of the gossip ipfs swarm structure + +Blob can accept commands from the differents channels it manages. + +IMPORTANT TODO!! +timeout.sh CPU problem to investigate + # IPFS FILESYSTEM STRUCTURE ``` diff --git a/zen/tools/sbotc-check-invite.sh b/zen/tools/sbotc-check-invite.sh new file mode 100755 index 0000000..fa0c980 --- /dev/null +++ b/zen/tools/sbotc-check-invite.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +invite="${1?invite}" +code="${invite##*~}" +addr="${invite%%~*}" +feed="${addr##*:}" +hostname="${addr%:*}" +host="${hostname%:*}" +port="${hostname##*:}" + +out="$(sbotc -s "$host" -p "$port" -k "$feed" -K "$code" -t async invite.use {} 2>&1)" +if echo "$out" | grep -q 'feed to follow is missing' +then + echo success +else + echo fail + echo "$out" + sbotc -s "$host" -p "$port" -k "$feed" -K "$code" -t source blobs.get '' + exit 1 +fi