Write fatal error to event log if running as service

Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
Upstream-commit: 40868e263d7a239aa10acd922bd69ba5a943781e
Component: engine
This commit is contained in:
Stefan Scherer
2016-09-19 22:36:33 +02:00
parent 0afc2f6a90
commit d99e04e924
@@ -41,6 +41,9 @@ func notifySystem() {
// notifyShutdown is called after the daemon shuts down but before the process exits.
func notifyShutdown(err error) {
if service != nil {
if err != nil {
logrus.Fatal(err)
}
service.stopped(err)
}
}