From 789889fe425e8079288f61305eda9b247e5a4d86 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 6 Mar 2023 22:26:30 +0100 Subject: [PATCH] modules/consul-service-registry: auto-restart in external mode --- modules/consul-service-registry/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/consul-service-registry/default.nix b/modules/consul-service-registry/default.nix index 2088d66..ffa3a44 100644 --- a/modules/consul-service-registry/default.nix +++ b/modules/consul-service-registry/default.nix @@ -51,6 +51,8 @@ let RemainAfterExit = true; ExecStart = "${consul} services register ${servicesJson}"; ExecStop = "${consul} services deregister ${servicesJson}"; + Restart = "on-failure"; + RestartSec = "1s"; }; }; }.${mode};