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
|
fi
|
||||||
|
|
||||||
: "${SERVER_PORT:=25565}"
|
: "${SERVER_PORT:=25565}"
|
||||||
cat <<EOF > /data/settings.yml
|
|
||||||
|
if [ ! -f /data/settings.yml ]; then
|
||||||
|
cat <<EOF > /data/settings.yml
|
||||||
#
|
#
|
||||||
# NanoLimbo configuration
|
# NanoLimbo configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
# Server's host address and port. Set ip empty to use public address
|
# Server's host address and port. Set ip empty to use public address
|
||||||
bind:
|
bind:
|
||||||
ip: '0.0.0.0'
|
ip: '0.0.0.0'
|
||||||
@@ -157,8 +158,11 @@ traffic:
|
|||||||
# Ignored if -1.0
|
# Ignored if -1.0
|
||||||
maxPacketBytesRate: 2048.0
|
maxPacketBytesRate: 2048.0
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
mc-image-helper patch --patch-env-prefix "" /image/nanolimbo-settings-patch.json
|
||||||
|
|
||||||
export SERVER
|
export SERVER
|
||||||
export FAMILY=LIMBO
|
export FAMILY=LIMBO
|
||||||
|
|
||||||
exec "$(dirname "$0")/start-setupMounts" "$@"
|
exec "$(dirname "$0")/start-setupMounts" "$@"
|
||||||
Reference in New Issue
Block a user