From 35d2fb6e01ad9fae09b4418bc2d371468f1385cb Mon Sep 17 00:00:00 2001 From: Stephan Klatt Date: Fri, 28 Oct 2016 15:30:48 +0200 Subject: [PATCH] init.sh: busybox kill compatible signal names busybox's kill does not accept -s SIGTERM, but only -s TERM --- scripts/init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index d699126172..e83b2e84fd 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -156,7 +156,7 @@ function stop() { if kill -0 $PID &>/dev/null; then echo "Stopping $NAME..." # Process still up, send SIGTERM and remove PIDFILE - kill -s SIGTERM $PID &>/dev/null && rm -f "$PIDFILE" &>/dev/null + kill -s TERM $PID &>/dev/null && rm -f "$PIDFILE" &>/dev/null n=0 while true; do # Enter loop to ensure process is stopped @@ -173,7 +173,7 @@ function stop() { if [ $n -eq 30 ]; then # After 30 seconds, send SIGKILL echo "Timeout exceeded, sending SIGKILL..." - kill -s SIGKILL $PID &>/dev/null + kill -s KILL $PID &>/dev/null elif [ $? -eq 40 ]; then # After 40 seconds, error out log_failure_msg "could not stop $NAME process"