Replace manual jq with getLocalConfValue
This commit is contained in:
parent
30ae3e1926
commit
d97fe62301
1 changed files with 2 additions and 2 deletions
|
@ -38,8 +38,8 @@ function startpod() {
|
||||||
cd "$(getValueByKey 'PODMAN_DIRECTORY')/${1}"
|
cd "$(getValueByKey 'PODMAN_DIRECTORY')/${1}"
|
||||||
|
|
||||||
# check if network is needed
|
# check if network is needed
|
||||||
if [[ -n $(jq -r .network.name "$(getValueByKey 'PODMAN_DIRECTORY')/${1}/config.json") ]]; then
|
if [[ -n $(getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} network.name) ]]; then
|
||||||
local network="$(jq -r .network.name $(getValueByKey 'PODMAN_DIRECTORY')/${1}/config.json)"
|
local network="$(getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} network.name)"
|
||||||
if [[ -z $(podman network ls | grep "$network") ]]; then
|
if [[ -z $(podman network ls | grep "$network") ]]; then
|
||||||
podman network create "$network"
|
podman network create "$network"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue