Replace manual jq with getLocalConfValue

This commit is contained in:
LinuxSquare 2023-12-23 13:39:54 +01:00
parent 30ae3e1926
commit d97fe62301

View file

@ -38,8 +38,8 @@ function startpod() {
cd "$(getValueByKey 'PODMAN_DIRECTORY')/${1}"
# check if network is needed
if [[ -n $(jq -r .network.name "$(getValueByKey 'PODMAN_DIRECTORY')/${1}/config.json") ]]; then
local network="$(jq -r .network.name $(getValueByKey 'PODMAN_DIRECTORY')/${1}/config.json)"
if [[ -n $(getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} network.name) ]]; then
local network="$(getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} network.name)"
if [[ -z $(podman network ls | grep "$network") ]]; then
podman network create "$network"
fi