From 6adda8f1b25a75976b6eb5fb9a6d28abd043ee11 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 1 Jan 2024 13:10:24 -0600 Subject: [PATCH] Handle calculated MEMORY value along with Aikar's flags (#2568) --- scripts/start-finalExec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start-finalExec b/scripts/start-finalExec index 6d5e640b341..8136dc39880 100755 --- a/scripts/start-finalExec +++ b/scripts/start-finalExec @@ -88,7 +88,7 @@ elif versionLessThan 1.18.1; then fi fi -if isTrue ${ENABLE_ROLLING_LOGS:-false}; then +if isTrue "${ENABLE_ROLLING_LOGS:-false}"; then if ! ${canUseRollingLogs}; then log "ERROR: Using rolling logs is currently not possible in the selected version due to CVE-2021-44228" exit 1 @@ -139,7 +139,7 @@ fi if isTrue "${USE_AIKAR_FLAGS}"; then # From https://mcflags.emc.gs/ - if (( $(normalizeMemSize "${MAX_MEMORY}") >= $(normalizeMemSize 12g) )); then + if [[ $MAX_MEMORY ]] && (( $(normalizeMemSize "${MAX_MEMORY}") >= $(normalizeMemSize 12g) )); then log "Using Aikar's >12GB flags" G1NewSizePercent=40 G1MaxNewSizePercent=50