mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
Merge pull request #292552 from diogotcorreia/oci-containers-fix-stop-one-shot
nixos/oci-containers: ignore nonexistent container when stopping
This commit is contained in:
commit
5f39678474
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ let
|
||||||
|
|
||||||
preStop = if cfg.backend == "podman"
|
preStop = if cfg.backend == "podman"
|
||||||
then "podman stop --ignore --cidfile=/run/podman-${escapedName}.ctr-id"
|
then "podman stop --ignore --cidfile=/run/podman-${escapedName}.ctr-id"
|
||||||
else "${cfg.backend} stop ${name}";
|
else "${cfg.backend} stop ${name} || true";
|
||||||
|
|
||||||
postStop = if cfg.backend == "podman"
|
postStop = if cfg.backend == "podman"
|
||||||
then "podman rm -f --ignore --cidfile=/run/podman-${escapedName}.ctr-id"
|
then "podman rm -f --ignore --cidfile=/run/podman-${escapedName}.ctr-id"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue