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