1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

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.
This commit is contained in:
Niklas Hambüchen 2017-07-18 14:51:35 +02:00 committed by Franz Pletz
parent 597c9864b5
commit f4c53f1940

View file

@ -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";