[systemd-devel] Restart and RestartSec in packaged .service files
Reindl Harald
h.reindl at thelounge.net
Thu Sep 1 04:07:30 PDT 2011
Am 01.09.2011 12:48, schrieb "Jóhann B. Guðmundsson":
> On 09/01/2011 09:42 AM, Reindl Harald wrote:
>> yes and that is why "systemd" should generate a notify-mail to root as
>> self-written scripts are doing since years so they could be really
>> replaced with systemd - the silent restart is a unfinished thought
>
> Again with my admin hat it should not it.
it should be able because you are not the admin of my servers :-)
> It should provide the admin with the means to take actions if an failure occurs since in large deployments you
> might want send different email depending on which service is failing like sending hostmaster at example.com mail if
> bind goes down, webmaster at example.com if apache goes down etc.
in your environemnt maybe, but it should generally have SIMPLE options
for setups where hostmaster, webmaster, postmaster is the same person
> and at the same time take other action like potentially trigger abrt to send bug report or
> revert changes and restart the daemon etc. as opposed to pipe a simple mail notification
> to root and systemd provides exactly that to admins via OnFailure= see man systemd.unit
> for details...
http://0pointer.de/public/systemd-man/systemd.unit.html does not contain the word "mail"
"RestartNotifyMail=root" would be what is needed in SOHO environments!
well but a) there are missing options and b) OnFailure is simply a joke
if i say "Restart=always" then OnFailure is NOT triggered
if i say "Restart=always" i want a mail if this happens
not a own unit-file
http://0pointer.de/public/systemd-man/systemd.service.html
explains "Restart" and is missing genereally on-failure + on-abort
Restart=
Configures whether the main service process shall be restarted when it exits. Takes one of no, on-success,
on-failure, on-abort or always. If set to no (the default) the service will not be restarted when it exits. If set
to on-success it will be restarted only when it exited cleanly, i.e. terminated with an exit code of 0. If set to
on-failure it will be restarted only when it exited with an exit code not equalling 0, or when terminated by a
signal. If set to on-abort it will be restarted only if it exits due to reception of an uncaught signal. If set to
always the service will be restarted regardless whether it exited cleanly or not, or got terminated abnormally by a
signal
http://0pointer.de/public/systemd-man/systemd.unit.html
exlains "OnFailure"
OnFailure=Lists one or more units that are activated when this unit enters the 'failed' state
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110901/6ea57083/attachment.pgp>
More information about the systemd-devel
mailing list