From 3d906489984fd6d1ef4fc8d3f00e9ac01fd8b075 Mon Sep 17 00:00:00 2001 From: Gerrit Gogel Date: Wed, 27 Jan 2021 16:28:51 +0100 Subject: [PATCH] fix output of kill socat, increase waiting time for sigterm --- seafile-server/scripts/start.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/seafile-server/scripts/start.sh b/seafile-server/scripts/start.sh index 606b149..eeba876 100644 --- a/seafile-server/scripts/start.sh +++ b/seafile-server/scripts/start.sh @@ -26,11 +26,9 @@ function start_socat { function stop_socat { echo "Stopping socat..." - ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -15 > /dev/null - sleep 2 - if [ -z $(ps aux | grep '[s]ocat')]; then - ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -9 > /dev/null - fi + ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -15 |& tee /dev/null + sleep 5 + ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -9 |& tee /dev/null } function keep_running {