mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-04 15:59:27 +00:00
Removed pre-1.12 empty JSON file conversion (#1826)
This commit is contained in:
1 parent
e22acf63e9
commit
8b5a3f2077
1 file changed
+1
-10
+1
-10
@@ -93,16 +93,6 @@ if isTrue ${ENABLE_ROLLING_LOGS:-false}; then
|
|||||||
JVM_OPTS="-Dlog4j.configurationFile=/data/log4j2.xml ${JVM_OPTS}"
|
JVM_OPTS="-Dlog4j.configurationFile=/data/log4j2.xml ${JVM_OPTS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure files exist and are valid JSON (for pre-1.12 to 1.12 upgrades)
|
|
||||||
log "Checking for JSON files."
|
|
||||||
JSON_FILES=$(find /data -maxdepth 1 -name '*.json')
|
|
||||||
for j in $JSON_FILES; do
|
|
||||||
if [[ $(cat "$j" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') == "" ]]; then
|
|
||||||
log "Fixing JSON $j"
|
|
||||||
echo '[]' > $j
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Optional disable console
|
# Optional disable console
|
||||||
if versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
if versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
||||||
EXTRA_ARGS+=" --noconsole"
|
EXTRA_ARGS+=" --noconsole"
|
||||||
@@ -287,6 +277,7 @@ else
|
|||||||
|
|
||||||
log "Starting the Minecraft server..."
|
log "Starting the Minecraft server..."
|
||||||
|
|
||||||
|
# shellcheck disable=SC2206
|
||||||
finalArgs=(
|
finalArgs=(
|
||||||
$JVM_XX_OPTS
|
$JVM_XX_OPTS
|
||||||
$JVM_OPTS
|
$JVM_OPTS
|
||||||
|
|||||||
Reference in new issue
Block a user