try to control ssb-server

#!/bin/bash
while true; do
  ssb-server start
  sleep 3
done
This commit is contained in:
qo-op 2020-06-06 16:09:53 +02:00
parent 98866e605f
commit c47183f6a3
1 changed files with 6 additions and 6 deletions

View File

@ -21,12 +21,12 @@ export WHOAMI=$($MY_PATH/zen/tools/timeout.sh -t 3 sbotc whoami | jq -r .id)
if [[ "$WHOAMI" == "" ]]; then
### oasis ssb-server not responding!!!
[[ ! $(whereis 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 22
oasis --allow-host oasis.astroport.com --host oasis.astroport.com &
echo "sboc <-> SSB-SERVER IMPOSSIBLE..."
# 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 22
# oasis --allow-host oasis.astroport.com --host oasis.astroport.com &
fi
########################################################################
# HELP DEVLT: Search "TODO" in code