modules(pihole-container): improve stopping of the container
The service only waits until the container has been stopped.
This commit is contained in:
parent
53a4cddd7c
commit
8c58832c7d
1 changed files with 6 additions and 1 deletions
|
@ -340,10 +340,15 @@ in rec {
|
|||
} \
|
||||
docker-archive:${piholeFlake.packages.${pkgs.system}.piholeImage}
|
||||
'';
|
||||
ExecStopPost = "${pkgs.coreutils}/bin/sleep 30";
|
||||
#TODO check that user can control podman & has subuidmap/subgidmap set
|
||||
User = "${cfg.hostConfig.user}";
|
||||
};
|
||||
|
||||
postStop = ''
|
||||
while ${pkgs.podman}/bin/podman container exists ${cfg.hostConfig.containerName}; do
|
||||
${pkgs.coreutils-full}/bin/sleep 2;
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue