2019-01-14 01:00:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
. /start-utils
|
|
|
|
|
|
|
|
if isURL ${CUSTOM_SERVER}; then
|
|
|
|
filename=$(basename ${CUSTOM_SERVER})
|
|
|
|
export SERVER=/data/${filename}
|
|
|
|
|
2019-06-12 18:33:10 +00:00
|
|
|
if [[ -f ${SERVER} ]] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
2020-03-06 15:52:17 +00:00
|
|
|
log "Using previously downloaded jar at ${SERVER}"
|
2019-01-14 01:00:34 +00:00
|
|
|
else
|
2020-03-06 15:52:17 +00:00
|
|
|
log "Downloading custom server jar from ${CUSTOM_SERVER} ..."
|
2019-01-14 01:00:34 +00:00
|
|
|
if ! curl -sSL -o ${SERVER} ${CUSTOM_SERVER}; then
|
2020-03-06 15:52:17 +00:00
|
|
|
log "Failed to download from ${CUSTOM_SERVER}"
|
2019-01-14 01:00:34 +00:00
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
elif [[ -f ${CUSTOM_SERVER} ]]; then
|
2020-03-06 15:52:17 +00:00
|
|
|
log "Using custom server jar at ${CUSTOM_SERVER} ..."
|
2019-01-14 01:00:34 +00:00
|
|
|
export SERVER=${CUSTOM_SERVER}
|
|
|
|
|
|
|
|
else
|
2020-03-06 15:52:17 +00:00
|
|
|
log "CUSTOM_SERVER is not properly set to a URL or existing jar file"
|
2019-01-14 01:00:34 +00:00
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2020-04-21 23:30:48 +00:00
|
|
|
export SKIP_LOG4J_CONFIG=true
|
|
|
|
|
2019-01-14 01:00:34 +00:00
|
|
|
# Continue to Final Setup
|
|
|
|
exec /start-finalSetup01World $@
|