From 5015ba21e4feb9cca905bc557af3dffbb18f2552 Mon Sep 17 00:00:00 2001 From: poka Date: Thu, 4 Jun 2020 16:19:22 +0200 Subject: [PATCH] correctly kill ssb-server --- zen/tools/make_G1SSB_secret.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zen/tools/make_G1SSB_secret.sh b/zen/tools/make_G1SSB_secret.sh index 8c35e95..58f71e1 100755 --- a/zen/tools/make_G1SSB_secret.sh +++ b/zen/tools/make_G1SSB_secret.sh @@ -111,8 +111,14 @@ if [[ ! $(which oasis) ]]; then npm -g install ssb-server ## ADD SSB-SERVER FOR PRIVATE SSB MESSAGING (TODO: integrate Feedless modules on LOVELand Portal) else echo "Stopping OASIS" - kill -9 $(ps auxf --sort=+utime | grep -w oasis | 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}') + tokill=$(ps auxf --sort=+utime | grep -w oasis | grep -v -E 'color=auto|grep' | awk '{print $2}') + tokill+=$(ps auxf --sort=+utime | grep -w ssb-server | grep -v -E 'color=auto|grep' | awk '{print $2}') + + for tokill in $ssbD; do + kill -9 $tokill + done + + fi