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.

(cherry picked from commit f4c53f1940)

Closes #29861.
This commit is contained in:
Niklas Hambüchen
2017-07-18 14:51:35 +02:00
committed by Franz Pletz
parent e1bcebfd2a
commit e9bbe85605

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