From c7048bf7ad3860759862c1e653e95ac6e569a3e8 Mon Sep 17 00:00:00 2001 From: Christopher Bacher Date: Mon, 17 Oct 2022 01:29:48 +0200 Subject: [PATCH] modules(pihole-container): add RestartSec to give the container time to be properly removed The ExecStop from the previous commit was not enough the journald logs show that the container fails to restart because the old one is still around. --- modules/pihole-container.factory.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/pihole-container.factory.nix b/modules/pihole-container.factory.nix index 275fb75..e6fefe1 100644 --- a/modules/pihole-container.factory.nix +++ b/modules/pihole-container.factory.nix @@ -343,6 +343,7 @@ in rec { ExecStop = '' ${pkgs.podman}/bin/podman stop ${cfg.hostConfig.containerName} ''; + RestartSec = "5s"; #TODO check that user can control podman & has subuidmap/subgidmap set User = "${cfg.hostConfig.user}"; };