[systemd-devel] Graceful Socket Service Restarts

2016-08-26 Thread Evan Klitzke
Hi, I'm writing a network service that I would like systemd to manage. I'm trying to implement graceful restarts, and I'm interested in using the sd_listen/sd_notify interface. I have a basic POC but I'm interested in improving it. What I want is something like this: * systemd sends SIGTERM to o

Re: [systemd-devel] Monitoring whether all dependencies of a target are active

2016-08-26 Thread Reto Kaiser
Thanks for the gist, quite helpful! Regards, Reto On Fri, Aug 26, 2016 at 2:40 PM, Mantas Mikulėnas wrote: > On Fri, Aug 26, 2016 at 3:12 PM, Reto Kaiser wrote: >> >> Yes I was thinking to use "OnFailure". >> But I want to also detect stopped units, in case a program or a person >> stops a uni

Re: [systemd-devel] Monitoring whether all dependencies of a target are active

2016-08-26 Thread Mantas Mikulėnas
On Fri, Aug 26, 2016 at 3:12 PM, Reto Kaiser wrote: > Yes I was thinking to use "OnFailure". > But I want to also detect stopped units, in case a program or a person > stops a unit and forgets about it. That metric should tell me if all > my "important units" are active or not. > > I can live wit

Re: [systemd-devel] Monitoring whether all dependencies of a target are active

2016-08-26 Thread Reto Kaiser
Yes I was thinking to use "OnFailure". But I want to also detect stopped units, in case a program or a person stops a unit and forgets about it. That metric should tell me if all my "important units" are active or not. I can live with iterating over the output of "list-dependencies". But since its