From a9b353a2d834ae91db93298e724452c1817f1f02 Mon Sep 17 00:00:00 2001 From: Alex Jarmoszuk <5645408+ajarmoszuk@users.noreply.github.com> Date: Sun, 19 May 2024 01:08:09 +0200 Subject: [PATCH] Add mc_health_extra_args to autopause-fcns.sh functions --- files/auto/autopause-fcns.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/auto/autopause-fcns.sh b/files/auto/autopause-fcns.sh index 7a40cca78db..95dd985fa94 100644 --- a/files/auto/autopause-fcns.sh +++ b/files/auto/autopause-fcns.sh @@ -17,13 +17,13 @@ rcon_client_exists() { } mc_server_listening() { - mc-monitor status --host localhost --port "$SERVER_PORT" --timeout 10s >& /dev/null + mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "$SERVER_PORT" --timeout 10s >& /dev/null } java_clients_connections() { local connections if java_running ; then - if ! connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count); then + if ! connections=$(mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "$SERVER_PORT" --show-player-count); then # consider it a non-zero player count if the ping fails # otherwise a laggy server with players connected could get paused connections=1 @@ -36,4 +36,4 @@ java_clients_connections() { java_clients_connected() { (( $(java_clients_connections) > 0 )) -} \ No newline at end of file +}