Changed order of /plugins rsync to be before processing env vars

For #577
This commit is contained in:
Geoff Bourne
2020-07-06 17:16:51 -05:00
parent 825833c859
commit 9a7a532f7b
21 changed files with 35 additions and 30 deletions

27
start-finalSetupModconfig Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
. ${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 [ "$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
;;
*)
log "Invalid URL given for modconfig: Must be HTTP or HTTPS and a ZIP file"
;;
esac
fi
exec ${SCRIPTS:-/}start-finalSetupPlugins $@