mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
38 lines
911 B
Bash
Executable File
38 lines
911 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# shellcheck source=start-utils
|
|
. "${SCRIPTS:-/}start-utils"
|
|
isDebugging && set -x
|
|
|
|
: "${FORGE_VERSION:=}"
|
|
: "${MAGMA_MAINTAINED_TAG:=}"
|
|
|
|
resolveVersion
|
|
|
|
if [ -z $VERSION ]; then
|
|
log "ERROR the variable VERSION is not specified"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z $FORGE_VERSION ]; then
|
|
log "ERROR the variable FORGE_VERSION is not specified"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z $MAGMA_MAINTAINED_TAG ]; then
|
|
log "ERROR the variable MAGMA_MAINTAINED_TAG is not specified"
|
|
exit 1
|
|
fi
|
|
|
|
downloadUrl="https://github.com/magmamaintained/Magma-${VERSION}/releases/download/${MAGMA_MAINTAINED_TAG}/magma-${VERSION}-${FORGE_VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
|
|
|
|
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
|
log "ERROR: failed to download Magma Maintained server jar from $downloadUrl"
|
|
exit 1
|
|
fi
|
|
|
|
export SERVER
|
|
export FAMILY=HYBRID
|
|
|
|
exec "${SCRIPTS:-/}start-spiget" "$@"
|