Skip to content

Commit

Permalink
Exit if systemd notifier init failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Frolov committed Dec 22, 2023
1 parent af9314a commit c37f5b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ func (i *Instance) Run(instanceCnf *config.Instance) error {
notifier, err := sdnotifier.NewNotifier(instanceCnf.GetSystemdSocketPath(), instanceCnf.SystemdNotificationsDebug)
if err != nil {
ylogger.Zero.Error().Err(err).Msg("failed to initialize systemd notifier")
if instanceCnf.SystemdNotificationsDebug {
return err
}
}
notifier.Ready()

Expand Down

0 comments on commit c37f5b3

Please sign in to comment.