simple
This commit is contained in:
parent
d4334574ce
commit
3b1fb0d662
|
@ -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
|
||||
|
|
|
@ -41,21 +41,8 @@ ipfsnodeid=$(ipfs id -f='<id>\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;
|
||||
|
||||
#########################################################################################################
|
||||
|
|
Loading…
Reference in New Issue