From 5fabc153ef85d0551fef6063d396490f31eb9da1 Mon Sep 17 00:00:00 2001 From: LinuxSquare Date: Sat, 23 Dec 2023 13:13:11 +0100 Subject: [PATCH] Check if network is needed --- utils/podman | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/podman b/utils/podman index 446603c..d9ac13b 100644 --- a/utils/podman +++ b/utils/podman @@ -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() {