Re:“Support for System V scripts now deprecated; will be rem...
by Arnavion on Wednesday June 28, 2023 @07:57PM
(#36514461)
This requires the application to tell the service manager to wait for some signal that it has successfully "finished starting" beyond just "the process was created". There's no standard way to do it. In systemd's case this is done by opting in to inherit a socket that can be used to communicate that information (`Type=notify`, then calling `sd_notify()`).
[ Parent
| on HN ]
Re:“Support for System V scripts now deprecated; will be rem...
by bandrami on Wednesday June 28, 2023 @08:00PM
(#36514492)
Exactly: like I said below the pain point was never "generate a textual representation of the startup logic appropriate to the init system" but always "concretely define what you mean by a service being started or stopped and how to determine that".
Re:“Support for System V scripts now deprecated; will be rem...
by ilyt on Wednesday June 28, 2023 @08:09PM
(#36514577)
there is one other way
If you set Type=forking
and the app exits with non-zero code on start then that will get propagated back to systemctl start
but notify is far better option even if requiring extra app support.