diff options
author | Diogo Correia <me@diogotc.com> | 2024-03-01 10:41:00 +0000 |
---|---|---|
committer | Diogo Correia <me@diogotc.com> | 2024-03-01 10:41:00 +0000 |
commit | 81f21e39368705ec725a1aec7dc885b64930578c (patch) | |
tree | 24542d2f961380f0856bf7c1ce60e195c38e664e /nixos/modules/virtualisation | |
parent | b5f6e3881acf8ca8a35b8cdb8d4021e5bd469a4e (diff) |
nixos/oci-containers: ignore nonexistent container when stopping
Fixes #292551
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/oci-containers.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/oci-containers.nix b/nixos/modules/virtualisation/oci-containers.nix index a88715587d654..5bffb3f047166 100644 --- a/nixos/modules/virtualisation/oci-containers.nix +++ b/nixos/modules/virtualisation/oci-containers.nix @@ -312,7 +312,7 @@ let preStop = if cfg.backend == "podman" 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" then "podman rm -f --ignore --cidfile=/run/podman-${escapedName}.ctr-id" |