Merge pull request #248315 from apeschar/oci-containers-backend-stop
nixos/oci-containers: stop container using backend
This commit is contained in:
@@ -308,9 +308,10 @@ let
|
||||
);
|
||||
|
||||
preStop = if cfg.backend == "podman"
|
||||
then "[ $SERVICE_RESULT = success ] || podman stop --ignore --cidfile=/run/podman-${escapedName}.ctr-id"
|
||||
else "[ $SERVICE_RESULT = success ] || ${cfg.backend} stop ${name}";
|
||||
postStop = if cfg.backend == "podman"
|
||||
then "podman stop --ignore --cidfile=/run/podman-${escapedName}.ctr-id"
|
||||
else "${cfg.backend} stop ${name}";
|
||||
|
||||
postStop = if cfg.backend == "podman"
|
||||
then "podman rm -f --ignore --cidfile=/run/podman-${escapedName}.ctr-id"
|
||||
else "${cfg.backend} rm -f ${name} || true";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user