summary refs log tree commit diff
path: root/nixos/modules/services/networking/consul.nix
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-07-18 14:51:35 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2017-09-28 00:41:15 +0200
commitf4c53f1940de477a3cd7193306c5512d319b1c9d (patch)
tree3439463ca82ab8624965b2b961cde6ac7f531d79 /nixos/modules/services/networking/consul.nix
parent597c9864b58b60d24fdc16f54d7f343c09eedb92 (diff)
downloadnixpkgs-f4c53f1940de477a3cd7193306c5512d319b1c9d.tar
nixpkgs-f4c53f1940de477a3cd7193306c5512d319b1c9d.tar.gz
nixpkgs-f4c53f1940de477a3cd7193306c5512d319b1c9d.tar.bz2
nixpkgs-f4c53f1940de477a3cd7193306c5512d319b1c9d.tar.lz
nixpkgs-f4c53f1940de477a3cd7193306c5512d319b1c9d.tar.xz
nixpkgs-f4c53f1940de477a3cd7193306c5512d319b1c9d.tar.zst
nixpkgs-f4c53f1940de477a3cd7193306c5512d319b1c9d.zip
consul service: Restart on failure.
Consul is a service you typically want to have running all the time;
it's not supposed to quit by itself.
Diffstat (limited to 'nixos/modules/services/networking/consul.nix')
-rw-r--r--nixos/modules/services/networking/consul.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix
index 166ee773237..6333970cb33 100644
--- a/nixos/modules/services/networking/consul.nix
+++ b/nixos/modules/services/networking/consul.nix
@@ -183,6 +183,7 @@ in
           ExecReload = "${cfg.package.bin}/bin/consul reload";
           PermissionsStartOnly = true;
           User = if cfg.dropPrivileges then "consul" else null;
+          Restart = "on-failure";
           TimeoutStartSec = "0";
         } // (optionalAttrs (cfg.leaveOnStop) {
           ExecStop = "${cfg.package.bin}/bin/consul leave";