Check if network is needed

This commit is contained in:
LinuxSquare 2023-12-23 13:13:11 +01:00
parent 6d5d0f9649
commit 5fabc153ef

View file

@ -36,7 +36,13 @@ function startpod() {
fi
cd "$(getValueByKey 'PODMAN_DIRECTORY')/${1}"
podman-compose up
# check if network is needed
if [[ -n $(jq -r .network.name "$(getValueByKey 'PODMAN_DIRECTORY')/${1}/config.json") ]]; then
podman network create $(getValueByKey 'PODMAN_DIRECTORY')/${1}/config.json
fi
podman-compose up -d
}
function stoppod() {