code: func notifyShutdown(err error) {
  	if service != nil {
  		if err != nil {
  			logrus.Fatal(err)
  		}
  		service.stopped(err)
  	}
  }
docs: // notifyShutdown is called after the daemon shuts down but before the process exits.