mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-13 22:02:28 +00:00
Verify source URL and log if not working
This commit is contained in:
parent
e76068e63e
commit
a313c03fff
2 changed files with 8 additions and 3 deletions
|
@ -297,6 +297,9 @@ directory, if required.
|
||||||
**NOTE:** Unless you also mount `/data` as an external volume, this world
|
**NOTE:** Unless you also mount `/data` as an external volume, this world
|
||||||
will be deleted when the container is deleted.
|
will be deleted when the container is deleted.
|
||||||
|
|
||||||
|
**NOTE:** This URL must be accessible from inside the container. Therefore,
|
||||||
|
you should use an IP address or a globally resolveable FQDN, or else the
|
||||||
|
name of a linked container.
|
||||||
|
|
||||||
## JVM Configuration
|
## JVM Configuration
|
||||||
|
|
||||||
|
|
|
@ -93,15 +93,17 @@ esac
|
||||||
case "X$WORLD" in
|
case "X$WORLD" in
|
||||||
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
||||||
echo "Downloading world via HTTP"
|
echo "Downloading world via HTTP"
|
||||||
|
echo "$WORLD"
|
||||||
wget -q -O - "$WORLD" > /data/world.zip
|
wget -q -O - "$WORLD" > /data/world.zip
|
||||||
echo "Unzipping word"
|
echo "Unzipping word"
|
||||||
unzip -q /data/world.zip
|
unzip -q /data/world.zip
|
||||||
rm -f /data/world.zip
|
rm -f /data/world.zip
|
||||||
if [ ! -d /data/world ]; then
|
if [ ! -d /data/world ]; then
|
||||||
echo Renaming world directory...
|
echo World directory not found
|
||||||
for i in /data/*/level.dat; do
|
for i in /data/*/level.dat; do
|
||||||
if [ -f "$i" ]; then
|
if [ -f "$i" ]; then
|
||||||
d=`dirname "$i"`
|
d=`dirname "$i"`
|
||||||
|
echo Renaming world directory from $d
|
||||||
mv -f "$d" /data/world
|
mv -f "$d" /data/world
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -229,8 +231,8 @@ fi
|
||||||
if [ ! -e banned-players.json ]; then
|
if [ ! -e banned-players.json ]; then
|
||||||
echo '' > banned-players.json
|
echo '' > banned-players.json
|
||||||
fi
|
fi
|
||||||
if [ ! -e banned-ip.json ]; then
|
if [ ! -e banned-ips.json ]; then
|
||||||
echo '' > banned-ip.json
|
echo '' > banned-ips.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If any modules have been provided, copy them over
|
# If any modules have been provided, copy them over
|
||||||
|
|
Loading…
Reference in a new issue