mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-13 13:52:27 +00:00
ffb50cfe28
* Replacing killall with pkill and ps -a to ps -ax * Adding net-tools and removing -q from pkill * Missed the resume.sh * Christ there's a lot of ps calls * Adding -x to health.sh, replacing killall with pkill in sudoers-mv, and replacing su-exec with gosu in knockd-config.cfg Co-authored-by: sean.sullivan.ctr@progeny.net <sean.sullivan.ctr@progeny.net>
14 lines
378 B
Bash
14 lines
378 B
Bash
#!/bin/bash
|
|
|
|
. ${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
|
|
exit $?
|
|
fi
|