mirror of
https://github.com/kaboomserver/buildpack.git
synced 2024-09-28 19:23:01 +00:00
Add back log check
This commit is contained in:
parent
c392c6b6ce
commit
f96efa50be
|
@ -14,7 +14,8 @@ while true; do
|
|||
# If localhost:25565 doesn't respond to ping, or if the log file is older than
|
||||
# 3 minutes, kill the server
|
||||
|
||||
if [ "$(env printf '\xFE' | nc -w 15 localhost 25565 | wc -m)" -eq 0 ]; then
|
||||
if [ "$(env printf '\xFE' | nc -w 15 localhost 25565 | wc -m)" -eq 0 ] ||
|
||||
[ "$(( $(date +%s) - $(date -r $logfile +%s) ))" -gt 300 ]; then
|
||||
if [ "$(tail -20 $logfile | grep -c 'ERROR]: Requested chunk')" -eq 1 ]; then
|
||||
rm -rf $HOME/worlds/
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue