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:
Eelco Dolstra 2012-10-23 08:30:50 -04:00
parent e5fa3f108e
commit c980faebe2

View file

@ -94,7 +94,9 @@ let
if job.daemonType == "none" then { } else
throw "invalid daemon type `${job.daemonType}'")
// optionalAttrs (!job.task && job.respawn)
{ Restart = "always"; };
{ Restart = "always"; }
// optionalAttrs job.task
{ Type = "oneshot"; RemainAfterExit = false; };
};