feat: use server list ping for versions less than 1.7

#1131
This commit is contained in:
Geoff Bourne
2021-11-24 14:30:20 -06:00
parent 84c577cc96
commit dca29dcbb5
4 changed files with 14 additions and 3 deletions
+4 -1
View File
@@ -2,6 +2,9 @@
# shellcheck source=../scripts/start-utils
. "${SCRIPTS:-/}start-utils"
if [ -f /data/.mc-health.env ]; then
. /data/.mc-health.env
fi
if isTrue "${DISABLE_HEALTHCHECK}"; then
echo "Healthcheck disabled"
@@ -10,6 +13,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' |
echo "Java process suspended by Autopause function"
exit 0
else
mc-monitor status --host localhost --port "${SERVER_PORT:-25565}"
mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "${SERVER_PORT:-25565}"
exit $?
fi