Persist autopause watchdog default (#4325)

This commit is contained in:
sean0407 authored and GitHub committed 2026-10-14 14:39:01 -05:00
1 parent de5350c08e
commit b5596f6296
2 files changed
+11 -11

No files matched your search

-11
View File
@@ -53,17 +53,6 @@ if [[ "$AUTOPAUSE_KNOCK_INTERFACE" == "lo" ]] ; then
logWarning " Continuing with this setting."
fi
if [[ -n "$MAX_TICK_TIME" && "$MAX_TICK_TIME" != "-1" ]] ; then
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
elif [[ -z "$MAX_TICK_TIME" ]] ; then
MAX_TICK_TIME=-1
if versionLessThan 1.8.1; then
# 10 years
MAX_TICK_TIME=315360000000
fi
export MAX_TICK_TIME
fi
# seq_cooldown cannot be larger than AUTOPAUSE_TIMEOUT_KN, otherwise the server may
# become paused while knockd is still ignoring packets, preventing players from joining.
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
+11
View File
@@ -207,6 +207,17 @@ if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]];
fi
if isTrue "${ENABLE_AUTOPAUSE}"; then
if [[ -n "${MAX_TICK_TIME:-}" && "$MAX_TICK_TIME" != "-1" ]] ; then
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
elif [[ -z "${MAX_TICK_TIME:-}" ]] ; then
MAX_TICK_TIME=-1
if versionLessThan 1.8.1; then
# 10 years
MAX_TICK_TIME=315360000000
fi
export MAX_TICK_TIME
fi
# Keep the default in this process so it reaches server.properties setup.
"$(dirname "$0")/start-autopause"
elif isTrue "${ENABLE_AUTOSTOP}"; then
"$(dirname "$0")/start-autostop"