docker-minecraft-server/health.sh

12 lines
295 B
Bash
Raw Normal View History

2020-05-20 13:17:58 +00:00
#!/bin/bash
. ${SCRIPTS:-/}start-utils
2020-05-20 13:17:58 +00:00
if 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