Add stoppod funcitonality

This commit is contained in:
LinuxSquare 2023-12-23 13:38:11 +01:00
parent 5161cfd213
commit ce886b7164

View file

@ -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
}