diff options
Diffstat (limited to 'modules/system/upstart/upstart.nix')
-rw-r--r-- | modules/system/upstart/upstart.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/system/upstart/upstart.nix b/modules/system/upstart/upstart.nix index c7203d5672be..d73a19653a7f 100644 --- a/modules/system/upstart/upstart.nix +++ b/modules/system/upstart/upstart.nix @@ -82,6 +82,8 @@ let ${optionalString job.task "task"} ${optionalString (!job.task && job.respawn) "respawn"} + ${optionalString job.restartIfChanged "# RESTART-IF-CHANGED"} + ${ # preStop is run only if there is exec or script. # (upstart 0.6.5, job.c:562) optionalString (job.preStop != "") (assert hasMain; '' @@ -283,6 +285,15 @@ let ''; }; + restartIfChanged = mkOption { + type = types.bool; + default = true; + description = '' + Whether the job should be restarted if it has changed after a + NixOS configuration switch. + ''; + }; + task = mkOption { type = types.bool; default = false; |