sbotc problem!! stop oasis, restart ssb-server...
This commit is contained in:
parent
8c5867f67d
commit
1e2d73327a
|
@ -16,8 +16,18 @@ ME="${0##*/}"
|
||||||
####
|
####
|
||||||
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || er+=" ipfs daemon not running"
|
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || er+=" ipfs daemon not running"
|
||||||
export IPFSNODEID=$(ipfs id -f='<id>\n') || er+=" ipfs id problem"
|
export IPFSNODEID=$(ipfs id -f='<id>\n') || er+=" ipfs id problem"
|
||||||
export WHOAMI=$($MY_PATH/zen/tools/timeout.sh -t 3 sbotc whoami | jq -r .id) || er+=" sbotc whoami problem" # HAPPENS WHEN no ssb-server / patchork runs
|
export WHOAMI=$($MY_PATH/zen/tools/timeout.sh -t 3 sbotc whoami | jq -r .id)
|
||||||
[[ "$YOU" == "" || "$IPFSNODEID" == "" || "$WHOAMI" == "" ]] && echo "ERROR : $er " && exit 1
|
|
||||||
|
if [[ "$WHOAMI" == "" ]]; then
|
||||||
|
### oasis ssb-server not responding!!!
|
||||||
|
[[ ! $(which ssb-server) ]] && echo "sboc/SSB-SERVER IMPOSSIBLE..." && exit 1
|
||||||
|
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}')
|
||||||
|
ssb-server start &
|
||||||
|
sleep 10
|
||||||
|
export WHOAMI=$($MY_PATH/zen/tools/timeout.sh -t 3 sbotc whoami | jq -r .id) || er+=" sbotc whoami problem" # HAPPENS WHEN no ssb-server / patchork runs
|
||||||
|
[[ "$WHOAMI" == "" ]] && echo "ERROR! SSB LAYER NOT ACCESSIBLE" && exit 1
|
||||||
|
fi
|
||||||
########################################################################
|
########################################################################
|
||||||
# HELP DEVLT: Search "TODO" in code
|
# HELP DEVLT: Search "TODO" in code
|
||||||
# Write what you thing about the situation
|
# Write what you thing about the situation
|
||||||
|
|
Loading…
Reference in New Issue