From 9f1a18ef342dbefdcc515b98d53d7c8950b80f66 Mon Sep 17 00:00:00 2001 From: JairG Date: Wed, 2 Apr 2025 18:38:04 -0600 Subject: [PATCH] =?UTF-8?q?fixed=20logic=20to=20not=20compare=20the=20VERS?= =?UTF-8?q?ION=20number=20when=20VERSION=20is=20set=20to=20=E2=80=A6=20(#3?= =?UTF-8?q?389)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/auto/autopause-fcns.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/files/auto/autopause-fcns.sh b/files/auto/autopause-fcns.sh index 73ea4ba3..9c5aa86f 100644 --- a/files/auto/autopause-fcns.sh +++ b/files/auto/autopause-fcns.sh @@ -25,11 +25,17 @@ use_proxy() { } use_server_list_ping() { + if [[ "${VERSION^^}" == "LATEST" || "${VERSION^^}" == "SNAPSHOT" ]]; then + # Don't use server-list ping for unknown version + return 1 + fi + if versionLessThan 1.7; then echo "--use-server-list-ping" fi } + mc_server_listening() { mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" $(use_server_list_ping) --timeout 10s >&/dev/null }