mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
15 lines
377 B
Bash
15 lines
377 B
Bash
#!/bin/bash
|
|
|
|
. ${SCRIPTS:-/}start-utils
|
|
|
|
if isTrue "${DISABLE_HEALTHCHECK}"; then
|
|
echo "Healthcheck disabled"
|
|
exit 0
|
|
elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -a -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
|
|
exit $?
|
|
fi
|