1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Allow RHEL init script to detect daemon start pid failure

If you have some kind of bogus `other_args` in `/etc/sysconfig/docker` the start script will report "started" but it's full of lies. This enhances the flow so that if the pidfile never shows up (failure to start) you get a proper failure message.

I also added dots for fun.

Signed-off-by: Jeff Minard <jeff.minard@creditkarma.com>
This commit is contained in:
Jeff Minard 2015-07-21 16:35:24 -07:00 committed by Jeff Minard
parent 879f440a99
commit 6f8fdb8aa8

View file

@ -58,7 +58,13 @@ start() {
while [ ! -f $pidfile -a $tries -lt 10 ]; do
sleep 1
tries=$((tries + 1))
echo -n '.'
done
if [ ! -f $pidfile ]; then
failure
echo
exit 1
fi
success
echo
else