Allow for custom arguments

This commit is contained in:
JeremyStar™ 2024-04-20 17:14:51 +02:00
parent 166247c4bf
commit 38da08b9eb
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 12 additions and 1 deletions

View file

@ -54,3 +54,10 @@ MCSD_OPTIMIZED_FLAGS=true
## Configures the garbage collector ## Configures the garbage collector
## Supported are: G1GC, ZGC ## Supported are: G1GC, ZGC
MCSD_GARBAGECOLLECTOR=G1GC MCSD_GARBAGECOLLECTOR=G1GC
# CUSTOM_ARGS
## Allows you to configure custom
## arguments that will be passed to
## the Java virtual machine.
## Leave empty to disable.
MCSD_CUSTOM_ARGS=""

View file

@ -168,4 +168,8 @@ compile_flags
echo ":: Starting server" echo ":: Starting server"
cd /data||exit 69 cd /data||exit 69
exec "/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk/bin/java" ${FLAGS} -jar "/data/server.jar" ${ARGS} if [ -z "${MCSD_CUSTOM_ARGS}" ]; then
exec "/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk/bin/java" ${FLAGS} -jar "/data/server.jar" ${ARGS}
else
exec "/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk/bin/java" ${MCSD_CUSTOM_ARGS}
fi