[freeside-commits] branch master updated. 532fac6eb62b44e56686543efcc641d5c3662147
Ivan
ivan at 420.am
Wed Feb 4 21:47:26 PST 2015
The branch, master has been updated
via 532fac6eb62b44e56686543efcc641d5c3662147 (commit)
from 84bd1a42758d23b5068f664bad602664954ddf83 (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 532fac6eb62b44e56686543efcc641d5c3662147
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Feb 4 21:47:25 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