diff --git a/files/nanolimbo-settings-patch.json b/files/nanolimbo-settings-patch.json new file mode 100644 index 00000000..7946dd04 --- /dev/null +++ b/files/nanolimbo-settings-patch.json @@ -0,0 +1,12 @@ +{ + "file": "/data/settings.yml", + "ops": [ + { + "$set": { + "path": "$.bind.port", + "value": "${SERVER_PORT}", + "value-type": "int" + } + } + ] +} \ No newline at end of file diff --git a/scripts/start-deployNanoLimbo b/scripts/start-deployNanoLimbo index ab9fb8a8..15597848 100755 --- a/scripts/start-deployNanoLimbo +++ b/scripts/start-deployNanoLimbo @@ -14,11 +14,12 @@ if ! SERVER=$(mc-image-helper github download-latest-asset \ fi : "${SERVER_PORT:=25565}" -cat < /data/settings.yml + +if [ ! -f /data/settings.yml ]; then + cat < /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,8 +158,11 @@ 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 -exec "$(dirname "$0")/start-setupMounts" "$@" +exec "$(dirname "$0")/start-setupMounts" "$@" \ No newline at end of file