mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Added support for TYPE=LIMBO (#994)
This commit is contained in:
parent
8d0dbcd50e
commit
ecd253dd3e
14
README.md
14
README.md
@ -553,6 +553,20 @@ docker run -d -v /path/on/host:/data ... \
|
|||||||
|
|
||||||
In order to add mods, you have two options:
|
In order to add mods, you have two options:
|
||||||
|
|
||||||
|
### Running a Limbo server
|
||||||
|
|
||||||
|
A [Limbo](https://github.com/LOOHP/Limbo) server can be run by setting `TYPE` to `LIMBO`.
|
||||||
|
|
||||||
|
Configuration options with defaults:
|
||||||
|
|
||||||
|
- `LIMBO_BUILD`=LATEST
|
||||||
|
|
||||||
|
The `VERSION` will be ignored so locate the appropriate value from [here](https://ci.loohpjames.com/job/Limbo/) to match the version expected by clients.
|
||||||
|
|
||||||
|
- `FORCE_REDOWNLOAD`=false
|
||||||
|
- `LIMBO_SCHEMA_FILENAME`=default.schem
|
||||||
|
- `LEVEL`="Default;${LIMBO_SCHEMA_FILENAME}"
|
||||||
|
|
||||||
## Running a server with a Feed the Beast modpack
|
## Running a server with a Feed the Beast modpack
|
||||||
|
|
||||||
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
||||||
|
@ -171,11 +171,15 @@ case "${TYPE^^}" in
|
|||||||
exec ${SCRIPTS:-/}start-deployCanyon "$@"
|
exec ${SCRIPTS:-/}start-deployCanyon "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
LIMBO)
|
||||||
|
exec ${SCRIPTS:-/}start-deployLimbo "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
log "Invalid type: '$TYPE'"
|
log "Invalid type: '$TYPE'"
|
||||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
||||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON"
|
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON, LIMBO"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
57
start-deployLimbo
Normal file
57
start-deployLimbo
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
isDebugging && set -x
|
||||||
|
|
||||||
|
: ${LIMBO_BUILD:=LATEST}
|
||||||
|
: ${FORCE_REDOWNLOAD:=false}
|
||||||
|
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
||||||
|
: ${LEVEL:=Default;${LIMBO_SCHEMA_FILENAME}}
|
||||||
|
|
||||||
|
if [[ ${LIMBO_BUILD^^} == LATEST ]]; then
|
||||||
|
LIMBO_BUILD=lastStableBuild
|
||||||
|
fi
|
||||||
|
|
||||||
|
baseUrl="https://ci.loohpjames.com/job/Limbo/${LIMBO_BUILD}"
|
||||||
|
buildInfoUrl="${baseUrl}/api/json"
|
||||||
|
buildJson=$(curl -fsSL "${buildInfoUrl}")
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
log "ERROR failed to get build info from ${buildInfoUrl} (status=$?)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PURPUR_BUILD=$(jq -r '.number' <<<${buildJson})
|
||||||
|
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
|
||||||
|
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
||||||
|
|
||||||
|
export SERVER="purpur-${PURPUR_BUILD}.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||||
|
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
||||||
|
log "Downloading Limbo from $downloadUrl ..."
|
||||||
|
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||||
|
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
|
||||||
|
log "Downloading default schem file"
|
||||||
|
if ! curl -o "${LIMBO_SCHEMA_FILENAME}" -fsSL "${baseUrl}/artifact/${defaultSchemaPath}"; then
|
||||||
|
log "ERROR: failed to download schema file $baseUrl (status=$?)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${LEVEL} != "*;*" ]]; then
|
||||||
|
LEVEL="${LEVEL};${LIMBO_SCHEMA_FILENAME}"
|
||||||
|
fi
|
||||||
|
export LEVEL
|
||||||
|
|
||||||
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
Loading…
Reference in New Issue
Block a user