modules(pihole-container): add sleep in ExecStopPost=
to force a wait
This is necessary because podman-stop did not wait until the container was actually deleted and `RestartSec=` does not apply if the service is restarted by systemd itself (via restart). RestartSec only applies if the restart reason is covered by `Restart=`
This commit is contained in:
parent
c7048bf7ad
commit
53a4cddd7c
1 changed files with 1 additions and 4 deletions
|
@ -340,10 +340,7 @@ in rec {
|
||||||
} \
|
} \
|
||||||
docker-archive:${piholeFlake.packages.${pkgs.system}.piholeImage}
|
docker-archive:${piholeFlake.packages.${pkgs.system}.piholeImage}
|
||||||
'';
|
'';
|
||||||
ExecStop = ''
|
ExecStopPost = "${pkgs.coreutils}/bin/sleep 30";
|
||||||
${pkgs.podman}/bin/podman stop ${cfg.hostConfig.containerName}
|
|
||||||
'';
|
|
||||||
RestartSec = "5s";
|
|
||||||
#TODO check that user can control podman & has subuidmap/subgidmap set
|
#TODO check that user can control podman & has subuidmap/subgidmap set
|
||||||
User = "${cfg.hostConfig.user}";
|
User = "${cfg.hostConfig.user}";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue