docker-minecraft-server/files/auto/resume.sh

16 lines
351 B
Bash
Raw Normal View History

2020-05-20 13:17:58 +00:00
#!/bin/bash
2020-05-23 14:15:10 +00:00
. /start-utils
if isTrue "${DEBUG_AUTOPAUSE}"; then
set -x
fi
2020-05-23 14:15:10 +00:00
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
logAutopauseAction "Knocked from $1, resuming Java process"
echo "$1" > /var/log/knocked-source
pkill -CONT java
# remove .paused file from data directory
rm -f /data/.paused
2020-05-20 13:17:58 +00:00
fi