mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-15 19:53:17 +00:00
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
#umask 002
|
#umask 002
|
||||||
export HOME=/data
|
export HOME=/data
|
||||||
|
|
||||||
@@ -561,12 +563,12 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure files exist and are valid JSON (for pre-1.12 to 1.12 upgrades)
|
# Make sure files exist and are valid JSON (for pre-1.12 to 1.12 upgrades)
|
||||||
if [[ ! -e banned-players.json || ! $(jq banned-players.json &> /dev/null) ]]; then
|
for j in *.json; do
|
||||||
echo '[]' > banned-players.json
|
if [[ $(python -c "print open('$j').read().strip()==''") = True ]]; then
|
||||||
fi
|
echo "Fixing JSON $j"
|
||||||
if [[ ! -e banned-ips.json || ! $(jq banned-ips.json &> /dev/null) ]]; then
|
echo '[]' > $j
|
||||||
echo '[]' > banned-ips.json
|
fi
|
||||||
fi
|
done
|
||||||
|
|
||||||
# If any modules have been provided, copy them over
|
# If any modules have been provided, copy them over
|
||||||
mkdir -p /data/mods
|
mkdir -p /data/mods
|
||||||
|
|||||||
Reference in New Issue
Block a user