Re: [systemd-devel] GuessMainPID=no required to make daemon reload work

2014-05-04 Thread Kirill Elagin
OK, I've just re-read your message and it looks like all you need is add `PIDFile` to your unit. systemd will behave as expected: once your main process terminates it will re-read PID from this file (assuming that before dying your old process writes its child's PID) and set it as MAINPID for your

Re: [systemd-devel] Revisiting the "ExecRestart" issue

2014-05-04 Thread Brandon Black
On Thu, Apr 24, 2014 at 1:34 AM, Lennart Poettering wrote: > On Wed, 23.04.14 21:20, Brandon Black (blbl...@gmail.com) wrote: > > > The problem here is that the daemon performs operations that require root > > privilege on startup, and then dumps its privileges for runtime, and thus > > its execve

Re: [systemd-devel] GuessMainPID=no required to make daemon reload work

2014-05-04 Thread Gerd v. Egidy
Hi Кирилл, > Have you looked into using sd_notify to update MAINPID? No, not yet. I have sd_notify on my list of things to look at in the future, but I wanted to make the service work without changing the daemon itself first. Thanks for the hint about this possibility. Kind regards, Gerd ___

Re: [systemd-devel] GuessMainPID=no required to make daemon reload work

2014-05-04 Thread Kirill Elagin
Have you looked into using sd_notify to update MAINPID? -- Кирилл Елагин On Mon, May 5, 2014 at 1:19 AM, Gerd v. Egidy wrote: > Hi, > > I'm one of the developers of the Icinga monitoring system. We want to > provide > a .service file for our monitoring daemon with the next major release > (Ic

[systemd-devel] GuessMainPID=no required to make daemon reload work

2014-05-04 Thread Gerd v. Egidy
Hi, I'm one of the developers of the Icinga monitoring system. We want to provide a .service file for our monitoring daemon with the next major release (Icinga 2). Due to technical reasons, the daemon can't reload it's configuration files within one process. So we implement reload like this: