Skip to content

Commit

Permalink
fix: Add back MEMORY property for entrypoint, closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Dec 3, 2024
1 parent 1284bc5 commit 6760e83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/rootless
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6760e83

Please sign in to comment.