mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 23:16:24 +00:00
16 lines
434 B
Bash
Executable File
16 lines
434 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# shellcheck source=../scripts/start-utils
|
|
. "${SCRIPTS:-/}start-utils"
|
|
|
|
if isTrue "${DISABLE_HEALTHCHECK}"; then
|
|
echo "Healthcheck disabled"
|
|
exit 0
|
|
elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }')" =~ ^T.*$ ]]; then
|
|
echo "Java process suspended by Autopause function"
|
|
exit 0
|
|
else
|
|
mc-monitor status --host localhost --port "${SERVER_PORT:-25565}"
|
|
exit $?
|
|
fi
|