From 5c70f94883814e5e09ccf8b1cdfc56a733777e0a Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Fri, 30 Aug 2024 15:32:10 +0300 Subject: [PATCH] fix typos and array declaration --- bash/start.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bash/start.sh b/bash/start.sh index 425c2a6..746444a 100755 --- a/bash/start.sh +++ b/bash/start.sh @@ -10,9 +10,9 @@ #. .env # auto-restart -AUTO_RESTART=${AUTO_RESTART:-1} # 1 to enable -RESTART_DELAY=${RESTART_DELAY:-3} # seconds -DONT_RESTART_IF=${DONT_RESTART_IF:0} # exit code +AUTO_RESTART=${AUTO_RESTART:-1} # 1 to enable +RESTART_DELAY=${RESTART_DELAY:-3} # seconds +DONT_RESTART_IF=${DONT_RESTART_IF-130} # exit code # java options JAVA_BIN=${JAVA_BIN:-java} # full path to the java binary @@ -27,12 +27,12 @@ GC_CONC_THREADS=${GC_CONC_THREADS:-"$(( half=GC_PAR_THREADS / 2, half == 0 ? 1 : # marker thread count, defaults to half of parallel # mc options -MC_FLAGS=${MC_FLAGS:nogui} # Minecraft flags +MC_FLAGS=${MC_FLAGS-nogui} # Minecraft flags SERVER_JAR=${SERVER_JAR:-server.jar} # server JAR file # --- -gcs=( +declare -A gcs=( [zgc]="-XX:+UseZGC" [shenandoahgc]="-XX:+UseShenandoahGC" ) @@ -65,7 +65,7 @@ java_args+=(-jar "${SERVER_JAR}" $MC_FLAGS) echo "Using settings:" echo "Java binary: ${JAVA_BIN?}" # shellcheck disable=SC2145 - echo "Options: ${java_args[@]@Q} ${}" + echo "Options: ${java_args[@]@Q}" echo "Auto restart: $( (( AUTO_RESTART )) && echo 'enabled' || echo 'disabled' )" } 2>&1