The official documentation is in the [sd_notify(3)] manual page.
Very short summary:
- Change your systemd service to
- Your daemon will receive an environment variable
NOTIFY_SOCKET, which contains a path to an AF_UNIX socket.
(If the first path byte is
@, this means an "abstract" socket, and you should change the 1st byte to 0x00 before using.)
- The protocol consists of sending datagrams containing textual (UTF-8) status messages.
Each message contains newline-separated
- When the daemon is ready, it must send
READY=1, and systemd will transition the service from "starting" to "running".