Do not overwrite existing NanoLimbo settings.yml (#3799)

This commit is contained in:
Aki
2025-12-13 10:16:08 +08:00
committed by GitHub
parent d1535c1eeb
commit d7d3cc50a0
2 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
{
"file": "/data/settings.yml",
"ops": [
{
"$set": {
"path": "$.bind.port",
"value": "${SERVER_PORT}",
"value-type": "int"
}
}
]
}

View File

@@ -14,11 +14,12 @@ if ! SERVER=$(mc-image-helper github download-latest-asset \
fi
: "${SERVER_PORT:=25565}"
if [ ! -f /data/settings.yml ]; then
cat <<EOF > /data/settings.yml
#
# NanoLimbo configuration
#
# Server's host address and port. Set ip empty to use public address
bind:
ip: '0.0.0.0'
@@ -157,6 +158,9 @@ traffic:
# Ignored if -1.0
maxPacketBytesRate: 2048.0
EOF
fi
mc-image-helper patch --patch-env-prefix "" /image/nanolimbo-settings-patch.json
export SERVER
export FAMILY=LIMBO