diff --git a/zen/README.md b/zen/README.md index a8cadd5..df0d109 100644 --- a/zen/README.md +++ b/zen/README.md @@ -16,7 +16,12 @@ mv ~/.ipfs/swarm.key ~/.ipfs/swarm.key.old sudo systemctl restart ipfs # Restart ssb-server -# kill -9 $(ps auxf --sort=+utime | grep -w ssb-server| grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}') +kill -9 $(ps auxf --sort=+utime | grep -w ssb-daemon| 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}'); +kill -9 $(ps auxf --sort=+utime | grep -w oasis | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}') +printf '{"manifest":"sync"}' > ~/.ssb/manifest.json +ssb-server start & +sbotc -t async manifest > ~/.ssb/manifest.json # IPFS FILESYSTEM STRUCTURE diff --git a/zen/g1_MONITOR_zen.sh b/zen/g1_MONITOR_zen.sh index 2f0c686..6f4130b 100755 --- a/zen/g1_MONITOR_zen.sh +++ b/zen/g1_MONITOR_zen.sh @@ -41,21 +41,8 @@ ipfsnodeid=$(ipfs id -f='\n') DELAYUNIT=$(echo $DELAY | cut -d ' ' -f 2) # g1pub=$2 # DEBUG -if [[ $g1pub == "" ]]; then - if [[ -f ~/.ssb/secret ]]; then - ssbpub=$(cat ~/.ssb/secret | grep public\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g) - ssbpriv=$(cat ~/.ssb/secret | grep private\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g) - g1pub=$(echo $ssbpub | base64 -d | base58) - g1priv=$(echo $ssbpriv | base64 -d | base58) - if [[ ! -f ~/.ssb/secret.dunikey ]]; then - echo "pub: $g1pub" > ~/.ssb/secret.dunikey - echo "sec: $g1priv" >> ~/.ssb/secret.dunikey - fi - else - g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) - g1priv=$(cat ~/.ssb/secret.dunikey | grep 'sec:' | cut -d ' ' -f 2) - fi -fi +[[ ! -f ~/.ssb/secret.dunikey ]] && $MY_PATH/tools/secret2dunikey.sh +g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) [[ "$g1pub" == "" ]] && echo "$USER Missing ~/.ssb/secret : Please Install Scuttlebutt server !" && exit 1; #########################################################################################################