fix: Check if IP is specified (#290)

This commit is contained in:
Kroese 2025-03-19 09:37:33 +01:00 committed by GitHub
parent 6c800a97bf
commit c791f2a2fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -628,7 +628,9 @@ updateXML() {
local language="$2" local language="$2"
local culture region user admin pass keyboard local culture region user admin pass keyboard
sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset" if [ -n "${VM_NET_IP:-}" ]; then
sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset"
fi
[ -z "$HEIGHT" ] && HEIGHT="720" [ -z "$HEIGHT" ] && HEIGHT="720"
[ -z "$WIDTH" ] && WIDTH="1280" [ -z "$WIDTH" ] && WIDTH="1280"