Skip to content

Commit d7d3cc5

Browse files
authored
Do not overwrite existing NanoLimbo settings.yml (#3799)
1 parent d1535c1 commit d7d3cc5

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"file": "/data/settings.yml",
3+
"ops": [
4+
{
5+
"$set": {
6+
"path": "$.bind.port",
7+
"value": "${SERVER_PORT}",
8+
"value-type": "int"
9+
}
10+
}
11+
]
12+
}

scripts/start-deployNanoLimbo

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ if ! SERVER=$(mc-image-helper github download-latest-asset \
1414
fi
1515

1616
: "${SERVER_PORT:=25565}"
17-
cat <<EOF > /data/settings.yml
17+
18+
if [ ! -f /data/settings.yml ]; then
19+
cat <<EOF > /data/settings.yml
1820
#
1921
# NanoLimbo configuration
2022
#
21-
2223
# Server's host address and port. Set ip empty to use public address
2324
bind:
2425
ip: '0.0.0.0'
@@ -157,8 +158,11 @@ traffic:
157158
# Ignored if -1.0
158159
maxPacketBytesRate: 2048.0
159160
EOF
161+
fi
162+
163+
mc-image-helper patch --patch-env-prefix "" /image/nanolimbo-settings-patch.json
160164

161165
export SERVER
162166
export FAMILY=LIMBO
163167

164-
exec "$(dirname "$0")/start-setupMounts" "$@"
168+
exec "$(dirname "$0")/start-setupMounts" "$@"

0 commit comments

Comments
 (0)