docker-minecraft-server/scripts/start-deployCustom
chblodg a57adc04ff
Add GameType filter, and add ForgeAPI Verify Files to validate Mod Downloads (#1337)
Co-authored-by: christopher blodgett <christopher.blodgett@gmail.com>
2022-02-08 19:24:38 -06:00

37 lines
953 B
Bash
Executable file

#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
if isURL ${CUSTOM_SERVER}; then
filename=$(basename ${CUSTOM_SERVER})
export SERVER=/data/${filename}
if [[ -f ${SERVER} ]] || [ -n "$FORCE_REDOWNLOAD" ]; then
log "Using previously downloaded jar at ${SERVER}"
else
log "Downloading custom server jar from ${CUSTOM_SERVER} ..."
if ! curl -sSL -o ${SERVER} ${CUSTOM_SERVER}; then
log "Failed to download from ${CUSTOM_SERVER}"
exit 2
fi
fi
elif [[ -f ${CUSTOM_SERVER} ]]; then
export SERVER=${CUSTOM_SERVER}
elif [[ ${GENERIC_PACK} ]]; then
log "Using custom server jar from generic pack at ${CUSTOM_SERVER} ..."
export SERVER=${CUSTOM_SERVER}
else
log "CUSTOM_SERVER is not properly set to a URL or existing jar file"
exit 2
fi
# Allow for overriding Family on custom for testing.
export FAMILY="${FAMILY:-HYBRID}"
exec ${SCRIPTS:-/}start-setupWorld $@