2017-11-01 05:42:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-06-19 16:05:32 +00:00
|
|
|
. ${SCRIPTS:-/}start-utils
|
2020-03-06 15:52:17 +00:00
|
|
|
|
2017-11-01 05:42:44 +00:00
|
|
|
# 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])
|
2020-03-06 15:52:17 +00:00
|
|
|
log "Downloading mod/plugin configs via HTTP"
|
|
|
|
log " from $MODCONFIG ..."
|
2017-11-01 05:42:44 +00:00
|
|
|
curl -sSL -o /tmp/modconfig.zip "$MODCONFIG"
|
|
|
|
if [ "$TYPE" = "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
|
|
|
|
;;
|
|
|
|
*)
|
2020-03-06 15:52:17 +00:00
|
|
|
log "Invalid URL given for modconfig: Must be HTTP or HTTPS and a ZIP file"
|
2017-11-01 05:42:44 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2020-12-28 04:01:03 +00:00
|
|
|
exec ${SCRIPTS:-/}start-finalSetupMounts $@
|