This commit is contained in:
LinuxSquare 2024-03-16 19:01:20 +01:00
parent cc1bc85168
commit 4a40ca1cfd

View file

@ -94,7 +94,7 @@ function buildImage() {
function startContainer() {
log d "Starting container '$1'"
IFS=$'\n' read -r -a additional_ports <<<"$(getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} 'additional_ports[]')"
getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} 'additional_ports[]' | tr '\n' ' '
IFS=$'\n' getLocalConfValue $(getValueByKey 'PODMAN_DIRECTORY')/${1} 'additional_ports[]'
echo "${additional_ports[@]}"
read
podman run --name "${1}" --userns=keep-id:uid=1000 --rm -it -d --network "${5}" -p $([[ -n "${4}" ]] && echo ${4}:)${3}:25565 $([[ ${#additional_ports} -gt 0 ]] && for port in "${additional_ports[@]}"; do echo "-p $([[ -n ${4} ]] && echo ${4}:)${port}:${port}"; done) -v $(getValueByKey 'PODMAN_DIRECTORY')/${1}/data:/var/server "${2}" java -Dcom.mojang.eula.agree=true -jar /var/exec/server.jar --nogui --port 25565