From 6760e8313c648e2cb7812f29a0b1cf8ed5181a03 Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Tue, 3 Dec 2024 01:06:39 -0500 Subject: [PATCH] fix: Add back MEMORY property for entrypoint, closes #4 --- scripts/rootless | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/rootless b/scripts/rootless index 520c2e6..7d44d24 100644 --- a/scripts/rootless +++ b/scripts/rootless @@ -7,9 +7,12 @@ echo [Init] Running scripts as user: $(whoami) . /scripts/keepup . /scripts/download_server +MEMORY=${MEMORY:-"2G"} +JVM_OPTS=${JVM_OPTS:-"-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true"} + # If /start exists if [ -f /start ]; then exec /start else - exec java $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar "$(basename "${CUSTOM_SERVER}")" "$@" $EXTRA_ARGS +exec java -Xms${MEMORY} -Xmx${MEMORY} $JVM_XX_OPTS $JVM_OPTS $expandedDOpts -jar "$(basename "${CUSTOM_SERVER}")" "$@" $EXTRA_ARGS fi