Added support for Magma servers

For #497
This commit is contained in:
Geoff Bourne 2020-04-21 18:30:48 -05:00
parent 757a5146a1
commit e9b1332119
6 changed files with 34 additions and 1 deletions

View file

@ -444,6 +444,14 @@ This works well if you want to have a common set of plugins in a separate
location, but still have multiple worlds with different server requirements
in either persistent volumes or a downloadable archive.
## Running a Magma server
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
-e TYPE=MAGMA
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
## Running a Server with a Feed-The-Beast (FTB) / CurseForge modpack
Enable this server mode by adding a `-e TYPE=FTB` or `-e TYPE=CURSEFORGE` to your command-line,

View file

@ -106,6 +106,10 @@ case "${TYPE^^}" in
exec /start-validateCurseInstance "$@"
;;
MAGMA)
exec /start-magma "$@"
;;
*)
log "Invalid type: '$TYPE'"
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTB, CURSEFORGE, SPONGEVANILLA"

View file

@ -82,6 +82,7 @@ fi
# Normalize on Spigot for operations below
export TYPE=SPIGOT
export SKIP_LOG4J_CONFIG=true
# Continue to Final Setup
exec /start-finalSetup01World $@

View file

@ -25,5 +25,7 @@ else
exit 2
fi
export SKIP_LOG4J_CONFIG=true
# Continue to Final Setup
exec /start-finalSetup01World $@

18
start-magma Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
. /start-utils
export SERVER="/data/magma-server-${VANILLA_VERSION}.jar"
# Always download since new updates of each base version are published frequently
if ! curl -o /data/magma-server-${VANILLA_VERSION}.jar -fsSL \
https://api.magmafoundation.org/api/resources/Magma/${VANILLA_VERSION}/stable/latest/download; then
log "ERROR unable to download version ${VANILLA_VERSION} of Magma"
log " Check https://magmafoundation.org/ for available versions"
exit 1
fi
export SKIP_LOG4J_CONFIG=true
# Continue to Final Setup
exec /start-finalSetup01World $@

View file

@ -27,7 +27,7 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
fi
fi
if [ ${TYPE} != "SPIGOT" ]; then
if ! isTrue ${SKIP_LOG4J_CONFIG}; then
# Set up log configuration
LOGFILE="/data/log4j2.xml"
if [ ! -e "$LOGFILE" ]; then