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()
|
do_graceful_stop()
|
||||||
{
|
{
|
||||||
PID=`cat $PIDFILE`
|
PID=`cat $PIDFILE`
|
||||||
kill -10 $PID
|
kill -USR1 $PID
|
||||||
|
|
||||||
# wait until really stopped
|
# wait until really stopped
|
||||||
if [ -n "${PID:-}" ]; then
|
if [ -n "${PID:-}" ]; then
|
||||||
while kill -0 "${PID:-}" 2> /dev/null; do
|
i=0
|
||||||
if [ $i = '0' ]; then
|
while kill -0 "${PID:-}" 2> /dev/null; do
|
||||||
echo -n " ... waiting "
|
if [ $i -eq '0' ]; then
|
||||||
else
|
echo -n " ... waiting "
|
||||||
echo -n "."
|
else
|
||||||
fi
|
echo -n "."
|
||||||
sleep 1
|
fi
|
||||||
done
|
i=$(($i+1))
|
||||||
fi
|
sleep 1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f /var/run/$NAME/*
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user