upstart.nix: Set ‘Type’ to ‘oneshot’ for Upstart tasks
This way the service will only reach the "started" state when the task has finished.
This commit is contained in:
parent
e5fa3f108e
commit
c980faebe2
|
@ -94,7 +94,9 @@ let
|
||||||
if job.daemonType == "none" then { } else
|
if job.daemonType == "none" then { } else
|
||||||
throw "invalid daemon type `${job.daemonType}'")
|
throw "invalid daemon type `${job.daemonType}'")
|
||||||
// optionalAttrs (!job.task && job.respawn)
|
// optionalAttrs (!job.task && job.respawn)
|
||||||
{ Restart = "always"; };
|
{ Restart = "always"; }
|
||||||
|
// optionalAttrs job.task
|
||||||
|
{ Type = "oneshot"; RemainAfterExit = false; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue