Browse code

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>

Jeff Minard authored on 2015/07/22 08:35:24
Showing 1 changed files
... ...
@@ -58,7 +58,13 @@ start() {
58 58
         while [ ! -f $pidfile -a $tries -lt 10 ]; do
59 59
             sleep 1
60 60
             tries=$((tries + 1))
61
+            echo -n '.'
61 62
         done
63
+        if [ ! -f $pidfile ]; then
64
+          failure
65
+          echo
66
+          exit 1
67
+        fi
62 68
         success
63 69
         echo
64 70
     else