Hi everybody, I tested a bit the mod_systemd backport proposal (thanks Joe for working on it!) and I have some doubts, that might be due to my limited understanding of systemd. I tried the following unit on Debian 10 (Buster):
-------------------------------------------------------------------- # /etc/systemd/system/apache2.service [Unit] Description=The Apache HTTP Server After=network.target [Service] Type=notify ExecStart=/usr/local/apache2/bin/httpd -k start ExecReload=/usr/local/apache2/bin/httpd -k graceful ExecStop=/usr/local/apache2/bin/httpd -k graceful-stop PrivateTmp=true [Install] WantedBy=multi-user.target -------------------------------------------------------------------- The type is "notify" on purpose, the "forking" one seems to work fine but IIUC it doesn't care at all the sd_notify() calls. I didn't put any "PidFile" since IIUC it should be provided by mod_systemd via notifications. This is what I get when trying to start: Starting The Apache HTTP Server... Started The Apache HTTP Server. apache2.service: Got notification message from PID 12291, but reception only permitted for main PID 12290 apache2.service: Got notification message from PID 12291, but reception only permitted for main PID which is currently not known apache2.service: Got notification message from PID 12291, but reception only permitted for main PID which is currently not known apache2.service: Succeeded. It seems as if the children processes signal systemd, but in theory from what I can see sd_notify is called only from hooks running in the main process. If I add NotifyAccess=all (default to "main"), the "Got notification etc.." goes away but I don't see any httpd process up. I am probably missing something obvious, so if anybody can clarify I'd be happy :) (vote + documentation will follow in exchange!) Luca
