[freeside-commits] branch FREESIDE_3_BRANCH updated. 4792471dbc3eb9e05f03bbff17b100ea89486d07
Ivan
ivan at 420.am
Wed Feb 4 21:47:27 PST 2015
The branch, FREESIDE_3_BRANCH has been updated
via 4792471dbc3eb9e05f03bbff17b100ea89486d07 (commit)
from 60f71e8b94fcd4403ad59c0508de59f90eb6edc5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4792471dbc3eb9e05f03bbff17b100ea89486d07
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Feb 4 21:47:26 2015 -0800
reliabily kill off old freeside-selfservice-server processes, RT#33174
diff --git a/init.d/freeside-init b/init.d/freeside-init
index 92e3fdf..705afc1 100644
--- a/init.d/freeside-init
+++ b/init.d/freeside-init
@@ -160,6 +160,7 @@ case "$1" in
then
echo -n "Stopping (old) freeside-selfservice-server: "
kill `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.pid`
+ sleep
rm /var/run/freeside-selfservice-server.$SELFSERVICE_USER.pid
echo "done."
fi
@@ -168,9 +169,20 @@ case "$1" in
for MACHINE in $SELFSERVICE_MACHINES; do
if [ -e /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid ]
then
- echo -n "Stopping freeside-selfservice-server to $MACHINE: "
- kill `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid`
+ echo -n "Stopping freeside-selfservice-server to $MACHINE"
+ howlong=10
+ while [ $howlong -gt 0 ] && kill -0 `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid` 2>/dev/null; do
+ echo -n '.'
+ kill `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid`
+ sleep 1
+ howlong=$(( $howlong - 1 ))
+ if [ $howlong -eq 0 ]; then
+ echo -n 'forcefully.'
+ kill -9 `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid`
+ fi
+ done
echo "done."
+ rm /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid
fi
done
-----------------------------------------------------------------------
Summary of changes:
init.d/freeside-init | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list