From e22a08bb7a2fe32678c13ddfd7a539405414a5d0 Mon Sep 17 00:00:00 2001 From: Gerrit Gogel Date: Mon, 1 Feb 2021 13:06:59 +0100 Subject: [PATCH] use pkill for socat shutdown --- seafile-server/scripts/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seafile-server/scripts/start.sh b/seafile-server/scripts/start.sh index c8d07d0..c1e6699 100644 --- a/seafile-server/scripts/start.sh +++ b/seafile-server/scripts/start.sh @@ -26,9 +26,9 @@ function start_socat { function stop_socat { echo "Stopping socat..." - ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -15 |& tee /dev/null + pkill -15 -f socat sleep 5 - ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -9 |& tee /dev/null + pkill -9 -f socat } function keep_running {