From f66f599b11df494e00256e26d70ca6fdf4737668 Mon Sep 17 00:00:00 2001 From: Sinisa Veseli <sveseli@aps.anl.gov> Date: Thu, 1 Oct 2015 17:25:18 +0000 Subject: [PATCH] resolve issue with graceful shutdown not being enough; we now kill service with a KILL signal after graceful shutdown is attempted --- etc/init.d/dm-cat-web-service | 4 ++++ etc/init.d/dm-daq-web-service | 5 +++++ etc/init.d/dm-ds-web-service | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/etc/init.d/dm-cat-web-service b/etc/init.d/dm-cat-web-service index 89d6ee66..8c52c721 100755 --- a/etc/init.d/dm-cat-web-service +++ b/etc/init.d/dm-cat-web-service @@ -91,6 +91,10 @@ stop() { PID=`cat $DM_PID_FILE` kill $PID RETVAL=$? + sleep 1 + # Make sure we kill the process always, regardless of + # what happened with first kill + kill -KILL $PID > /dev/null 2>&1 [ $RETVAL -eq 0 ] && rm -f $DM_PID_FILE && success $"$DM_DAEMON_NAME shutdown" || failure $"$DM_DAEMON_NAME shutdown" echo return $RETVAL diff --git a/etc/init.d/dm-daq-web-service b/etc/init.d/dm-daq-web-service index f25537d7..77b83974 100755 --- a/etc/init.d/dm-daq-web-service +++ b/etc/init.d/dm-daq-web-service @@ -91,6 +91,10 @@ stop() { PID=`cat $DM_PID_FILE` kill $PID RETVAL=$? + sleep 1 + # Make sure we kill the process always, regardless of + # what happened with first kill + kill -KILL $PID > /dev/null 2>&1 [ $RETVAL -eq 0 ] && rm -f $DM_PID_FILE && success $"$DM_DAEMON_NAME shutdown" || failure $"$DM_DAEMON_NAME shutdown" echo return $RETVAL @@ -98,6 +102,7 @@ stop() { restart() { stop + sleep 1 start } diff --git a/etc/init.d/dm-ds-web-service b/etc/init.d/dm-ds-web-service index 0f1365e3..945505ac 100755 --- a/etc/init.d/dm-ds-web-service +++ b/etc/init.d/dm-ds-web-service @@ -91,6 +91,10 @@ stop() { PID=`cat $DM_PID_FILE` kill $PID RETVAL=$? + sleep 1 + # Make sure we kill the process always, regardless of + # what happened with first kill + kill -KILL $PID > /dev/null 2>&1 [ $RETVAL -eq 0 ] && rm -f $DM_PID_FILE && success $"$DM_DAEMON_NAME shutdown" || failure $"$DM_DAEMON_NAME shutdown" echo return $RETVAL @@ -98,6 +102,7 @@ stop() { restart() { stop + sleep 1 start } -- GitLab