-
Notifications
You must be signed in to change notification settings - Fork 231
support systemd notifications #1733
Description
https://www.freedesktop.org/software/systemd/man/systemd.service.html
Behavior of
notifyis similar toexec; however, it is expected that the service sends a notification message viasd_notify(3)or an equivalent call when it has finished starting up. systemd will proceed with starting follow-up units after this notification message has been sent. If this option is used,NotifyAccess=(see below) should be set to open access to the notification socket provided by systemd. IfNotifyAccess=is missing or set to none, it will be forcibly set tomain.
The main thing here is to send READY=1 after opening the listeners; this allows other service startups to block until Ergo is ready. (We could also send RELOADING=1 at the start of rehash, and STOPPING=1 at the start of shutdown.) Here's a (trivial) Golang library for this: