mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
07fc31b401
Unzipping world replace banned-ips.json? [y]es, [n]o, [A]ll, [N]one, [r]ename: unzip: can't read standard input
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# If supplied with a URL for a world, download it and unpack
|
|
if [[ "$WORLD" ]]; then
|
|
case "X$WORLD" in
|
|
X[Hh][Tt][Tt][Pp]*)
|
|
echo "Downloading world from $WORLD"
|
|
curl -sSL -o - "$WORLD" > /data/world.zip
|
|
echo "Unzipping world"
|
|
unzip -o -q /data/world.zip
|
|
rm -f /data/world.zip
|
|
if [ ! -d /data/world ]; then
|
|
echo World directory not found
|
|
for i in /data/*/level.dat; do
|
|
if [ -f "$i" ]; then
|
|
d=`dirname "$i"`
|
|
echo Renaming world directory from $d
|
|
mv -f "$d" /data/world
|
|
fi
|
|
done
|
|
fi
|
|
if [ "$TYPE" = "SPIGOT" ]; then
|
|
# Reorganise if a Spigot server
|
|
echo "Moving End and Nether maps to Spigot location"
|
|
[ -d "/data/world/DIM1" ] && mv -f "/data/world/DIM1" "/data/world_the_end"
|
|
[ -d "/data/world/DIM-1" ] && mv -f "/data/world/DIM-1" "/data/world_nether"
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Invalid URL given for world: Must be HTTP or HTTPS and a ZIP file"
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
exec /start-finalSetup02Modpack $@
|