Fix restart logic in zuul init script
Change-Id: I4ddd69916db4d9df036d3d674fb58847981d2758 Reviewed-on: https://review.openstack.org/13810 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Antoine Musso <hashar@free.fr> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
cd9e56e6e6
commit
c6059ce5d6
@ -78,19 +78,23 @@ do_stop()
|
||||
do_graceful_stop()
|
||||
{
|
||||
PID=`cat $PIDFILE`
|
||||
kill -10 $PID
|
||||
kill -USR1 $PID
|
||||
|
||||
# wait until really stopped
|
||||
if [ -n "${PID:-}" ]; then
|
||||
i=0
|
||||
while kill -0 "${PID:-}" 2> /dev/null; do
|
||||
if [ $i = '0' ]; then
|
||||
if [ $i -eq '0' ]; then
|
||||
echo -n " ... waiting "
|
||||
else
|
||||
echo -n "."
|
||||
fi
|
||||
i=$(($i+1))
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
rm -f /var/run/$NAME/*
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user