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:
unicell 2012-09-29 13:50:09 +08:00 committed by Jenkins
parent cd9e56e6e6
commit c6059ce5d6

View File

@ -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
while kill -0 "${PID:-}" 2> /dev/null; do
if [ $i = '0' ]; then
echo -n " ... waiting "
else
echo -n "."
fi
sleep 1
done
fi
# wait until really stopped
if [ -n "${PID:-}" ]; then
i=0
while kill -0 "${PID:-}" 2> /dev/null; do
if [ $i -eq '0' ]; then
echo -n " ... waiting "
else
echo -n "."
fi
i=$(($i+1))
sleep 1
done
fi
rm -f /var/run/$NAME/*
}
#