Re: [systemd-devel] directive for executing a script on service failure

2015-02-11 Thread George Karakougioumtzis
Since i couldn't find any info on the python's systemd-dbus api to get the status of the services that i wanted i looked into python-systemd and made a class (which is far from being ideal i must admit as i am a python newbie) that monitors the journal for failed services. Class is based upon info

Re: [systemd-devel] directive for executing a script on service failure

2015-02-10 Thread Lennart Poettering
On Fri, 06.02.15 21:23, Mantas Mikulėnas (graw...@gmail.com) wrote: > On Fri, Feb 6, 2015 at 5:26 PM, George Karakougioumtzis < > mad-proffes...@hotmail.com> wrote: > > > Hi. Congrats for the near perfect job on systemd! I was searching for a > > directive to execute a script upon systemd service

Re: [systemd-devel] directive for executing a script on service failure

2015-02-08 Thread George Karakougioumtzis
Yes you r absolutely right, its kind of hackish and not architectural correct. I did something (simple but suits my needs for now) in python that gets executed from gnome. Here it is if someone is interested in knowing the state of some services at specified intervals ### import dbus from dbus

Re: [systemd-devel] directive for executing a script on service failure

2015-02-06 Thread Alexandre Detiste
Le vendredi 6 février 2015, 21:23:14 Mantas Mikulėnas a écrit : > On Fri, Feb 6, 2015 at 5:26 PM, George Karakougioumtzis < > mad-proffes...@hotmail.com> wrote: > > > Hi. Congrats for the near perfect job on systemd! I was searching for a > > directive to execute a script upon systemd service fail

Re: [systemd-devel] directive for executing a script on service failure

2015-02-06 Thread George Karakougioumtzis
Interesting point, thanks for the clarifications. I thought that it would be as simple as setting the environmental variables DBUS_SESSION_BUS_ADRESS and DISPLAY at each unit file that you would want to receive notifications from.I thought that i might have not seen all the directives of systemd an

Re: [systemd-devel] directive for executing a script on service failure

2015-02-06 Thread Mantas Mikulėnas
On Fri, Feb 6, 2015 at 5:26 PM, George Karakougioumtzis < mad-proffes...@hotmail.com> wrote: > Hi. Congrats for the near perfect job on systemd! I was searching for a > directive to execute a script upon systemd service failure. I would like > to receive desktop notifications about such failures.

[systemd-devel] directive for executing a script on service failure

2015-02-06 Thread George Karakougioumtzis
Hi. Congrats for the near perfect job on systemd! I was searching for a directive to execute a script upon systemd service failure. I would like to receive desktop notifications about such failures. I stumbled upon OnFailure and FailureAction but these have hardcoded list of actions? Any hints how