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"