Re: [systemd-devel] systemd restart patch

2011-06-23 Thread Cristian Patrascu
On 02/08/2011 12:34 PM, Lennart Poettering wrote: On Mon, 07.02.11 10:01, Cristian Patrascu (cristian.patra...@windriver.com) wrote: On 02/03/2011 11:19 PM, Michael Biebl wrote: 2011/2/3 Tomasz Torcz: On Thu, Feb 03, 2011 at 09:35:55PM +0100, Michael Biebl wrote: ExecStartOnFailure=/some/cm

Re: [systemd-devel] systemd restart patch

2011-02-08 Thread Lennart Poettering
On Tue, 08.02.11 14:28, Cristian Patrascu (cristian.patra...@windriver.com) wrote: > >I think tis current behaviour probably makes little sense, so my > >suggestion would be to simply change it and run the services listed in > >OnFailure= only after we tried to restart the service and gave up. >

Re: [systemd-devel] systemd restart patch

2011-02-08 Thread Cristian Patrascu
On 02/08/2011 12:34 PM, Lennart Poettering wrote: On Mon, 07.02.11 10:01, Cristian Patrascu (cristian.patra...@windriver.com) wrote: On 02/03/2011 11:19 PM, Michael Biebl wrote: 2011/2/3 Tomasz Torcz: On Thu, Feb 03, 2011 at 09:35:55PM +0100, Michael Biebl wrote: ExecStartOnFailure=/some/cm

Re: [systemd-devel] systemd restart patch

2011-02-08 Thread Lennart Poettering
On Mon, 07.02.11 10:01, Cristian Patrascu (cristian.patra...@windriver.com) wrote: > > On 02/03/2011 11:19 PM, Michael Biebl wrote: > >2011/2/3 Tomasz Torcz: > >>On Thu, Feb 03, 2011 at 09:35:55PM +0100, Michael Biebl wrote: > >>>ExecStartOnFailure=/some/cmd (send an email or what not) > >> Isn

Re: [systemd-devel] systemd restart patch

2011-02-08 Thread Lennart Poettering
On Thu, 03.02.11 22:19, Michael Biebl (mbi...@gmail.com) wrote: > > 2011/2/3 Tomasz Torcz : > > On Thu, Feb 03, 2011 at 09:35:55PM +0100, Michael Biebl wrote: > >> ExecStartOnFailure=/some/cmd (send an email or what not) > > > >  Isn't “OnFailure=send-email-to-admin.service” sufficent? > > Havin

Re: [systemd-devel] systemd restart patch

2011-02-08 Thread Lennart Poettering
On Thu, 03.02.11 21:35, Michael Biebl (mbi...@gmail.com) wrote: > > 2011/2/3 Cristian Patrascu : > > So, for these last two features I created a patch, which adds two more > > options for a .service : > > - RestartRetries=n (where n is the number of restart retries) > > - ExecPostRestarts=/some/c

Re: [systemd-devel] systemd restart patch

2011-02-07 Thread Cristian Patrascu
On 02/03/2011 11:19 PM, Michael Biebl wrote: 2011/2/3 Tomasz Torcz: On Thu, Feb 03, 2011 at 09:35:55PM +0100, Michael Biebl wrote: ExecStartOnFailure=/some/cmd (send an email or what not) Isn't “OnFailure=send-email-to-admin.service” sufficent? Having to use a service file for this use case

Re: [systemd-devel] systemd restart patch

2011-02-03 Thread Michael Biebl
2011/2/3 Tomasz Torcz : > On Thu, Feb 03, 2011 at 09:35:55PM +0100, Michael Biebl wrote: >> ExecStartOnFailure=/some/cmd (send an email or what not) > >  Isn't “OnFailure=send-email-to-admin.service” sufficent? Having to use a service file for this use case is imho cumbersome, especially since you

Re: [systemd-devel] systemd restart patch

2011-02-03 Thread Tomasz Torcz
On Thu, Feb 03, 2011 at 09:35:55PM +0100, Michael Biebl wrote: > 2011/2/3 Cristian Patrascu : > > So, for these last two features I created a patch, which adds two more > > options for a .service : > > - RestartRetries=n (where n is the number of restart retries) > > - ExecPostRestarts=/some/cmd (w

Re: [systemd-devel] systemd restart patch

2011-02-03 Thread Michael Biebl
2011/2/3 Cristian Patrascu : > So, for these last two features I created a patch, which adds two more > options for a .service : > - RestartRetries=n (where n is the number of restart retries) > - ExecPostRestarts=/some/cmd (where the command "/some/cmd" will be executed > after restart retries are

[systemd-devel] systemd restart patch

2011-02-03 Thread Cristian Patrascu
In the company I work for, I must have/implement the following functionality of a systemd service: - when a service stops with an exit code not 0, that is when it fails, it must be restarted. This is implemented, by using the option *Restart=on-failure*. Eventually, also *RestartSec=* can be use