[systemd-devel] ExecStartPost= behavior on failure

Honza Horak hhorak at redhat.com
Tue Nov 15 04:40:16 PST 2011


Hi,

I'm thinking of what is the desired behavior if the command 
ExecStartPost=somecommand fails.

If I understand it correctly, all other ExecStartPost= commands 
execution is stopped, but the main process continues to work (and the 
service is still active). From my POV this should happen when 
ExecStartPost= starts with '-'. But when '-' is not used, the service as 
well as the main process should be ended by systemd.

Is the present behavior really desired? And if so, how do I make systemd 
to stop the service when ExecStartPost= fails? Is it possible to define 
this in a unit file somehow?

Regards,

Honza


More information about the systemd-devel mailing list