[systemd-devel] dependent services status

Lennart Poettering lennart at poettering.net
Mon Nov 21 11:08:31 UTC 2022


On Do, 17.11.22 08:52, Ted Toth (txtoth at gmail.com) wrote:

> I have a set of services that depend on each other however when
> services are started and considered 'active' that does not necessarily
> mean they are in a state that a dependent service requires them to be
> in to operate properly (for example an inotify watch has been
> established).

This is a bug in those services. THey should not report startup
completion when they haven't completed startup. Part of startup is
considered evertyhing like "establish sockets", "establish inotify
watches" and so on...

> systemd services, I think,  have a substate, is there a
> way I can set that to a custom value to indicate the services idea of
> its own state?

For Type=notify services use sd_notify("READY=1") to communicate
startup completion.

For Type=forking serviecs exit in the parent process when the main
service process finished startup.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list