mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Do not overwrite existing NanoLimbo settings.yml (#3799)
This commit is contained in:
12
files/nanolimbo-settings-patch.json
Normal file
12
files/nanolimbo-settings-patch.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"file": "/data/settings.yml",
|
||||
"ops": [
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.bind.port",
|
||||
"value": "${SERVER_PORT}",
|
||||
"value-type": "int"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,11 +14,12 @@ if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
fi
|
||||
|
||||
: "${SERVER_PORT:=25565}"
|
||||
cat <<EOF > /data/settings.yml
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user