mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 22:34:22 +00:00
28 lines
775 B
Bash
Executable file
28 lines
775 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# shellcheck source=start-utils
|
|
. "${SCRIPTS:-/}start-utils"
|
|
|
|
# If supplied with a URL for a config (simple zip of configurations), download it and unpack
|
|
if [[ "$MODCONFIG" ]]; then
|
|
case "X$MODCONFIG" in
|
|
X[Hh][Tt][Tt][Pp]*[Zz][iI][pP])
|
|
log "Downloading mod/plugin configs via HTTP"
|
|
log " from $MODCONFIG ..."
|
|
curl -sSL -o /tmp/modconfig.zip "$MODCONFIG"
|
|
if [ "$FAMILY" = "SPIGOT" ]; then
|
|
mkdir -p /data/plugins
|
|
unzip -o -d /data/plugins /tmp/modconfig.zip
|
|
else
|
|
mkdir -p /data/config
|
|
unzip -o -d /data/config /tmp/modconfig.zip
|
|
fi
|
|
rm -f /tmp/modconfig.zip
|
|
;;
|
|
*)
|
|
log "Invalid URL given for modconfig: Must be HTTP or HTTPS and a ZIP file"
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
exec "${SCRIPTS:-/}start-setupMounts" "$@"
|