mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-02 05:32:16 +00:00
@@ -560,11 +560,11 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure files exist to avoid errors
|
# Make sure files exist and are valid JSON (for pre-1.12 to 1.12 upgrades)
|
||||||
if [ ! -e banned-players.json ]; then
|
if [[ ! -e banned-players.json || ! $(jq banned-players.json &> /dev/null) ]]; then
|
||||||
echo '[]' > banned-players.json
|
echo '[]' > banned-players.json
|
||||||
fi
|
fi
|
||||||
if [ ! -e banned-ips.json ]; then
|
if [[ ! -e banned-ips.json || ! $(jq banned-ips.json &> /dev/null) ]]; then
|
||||||
echo '[]' > banned-ips.json
|
echo '[]' > banned-ips.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user