dinitctl: recognize and report FAILEDSTART events.
authorDavin McCall <davmac@davmac.org>
Thu, 7 Jan 2016 21:34:23 +0000 (21:34 +0000)
committerDavin McCall <davmac@davmac.org>
Thu, 7 Jan 2016 21:34:23 +0000 (21:34 +0000)
src/dinitctl.cc

index 5be3ebc2e6970924e44497c7fc400031554bd731..1d1a55332cceaa54b4671d715eca3aedfd91314f 100644 (file)
@@ -277,6 +277,12 @@ int main(int argc, char **argv)
                             }
                             return 1;
                         }
+                        else if (! do_stop && event == ServiceEvent::FAILEDSTART) {
+                            if (verbose) {
+                                cout << "Service failed to start." << endl;
+                            }
+                            return 1;
+                        }
                     }
                 }
             }