From 6ff2521974681c406d36bb5f631261a8b6b8e3dc Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Thu, 10 Apr 2014 10:16:30 -0500 Subject: [PATCH] upstart: Oneshot rules should always have Restart=no --- nixos/modules/system/upstart/upstart.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/upstart/upstart.nix b/nixos/modules/system/upstart/upstart.nix index 1ad4885edf58..5c0461304072 100644 --- a/nixos/modules/system/upstart/upstart.nix +++ b/nixos/modules/system/upstart/upstart.nix @@ -93,7 +93,7 @@ let if job.daemonType == "fork" || job.daemonType == "daemon" then { Type = "forking"; GuessMainPID = true; } else if job.daemonType == "none" then { } else throw "invalid daemon type `${job.daemonType}'") - // optionalAttrs (!job.task && job.respawn) + // optionalAttrs (!job.task && !(job.script == "" && job.exec == "") && job.respawn) { Restart = "always"; } // optionalAttrs job.task { Type = "oneshot"; RemainAfterExit = false; };