diff --git a/utils/podman b/utils/podman index 4b0cb56..0e9eb45 100644 --- a/utils/podman +++ b/utils/podman @@ -58,4 +58,12 @@ function stoppod() { log e "Podman-directory of ${1} does not exist!" exit 1 fi + + if [[ -z $(podman container ls | grep $(getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} container.name)) ]]; then + log e "Container $(getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} container.name) does not exist!" + exit 1 + fi + + cd "$(getValueByKey 'PODMAN_DIRECTORY')/${1}" + podman-compose down }