Reduce false positives in alive checker

This commit is contained in:
mathiascode 2020-01-06 02:03:35 +02:00
parent 3ce042e6f9
commit ca530007c0

View file

@ -16,7 +16,7 @@ while true; do
if [ "$(env printf '\xFE' | nc -w 5 localhost 25565 | wc -m)" -eq 0 ] ||
[ "$(( $(date +%s) - $(date -r $logfile +%s) ))" -gt 180 ] ||
[ "$(tail -5 $logfile | grep -cE 'Server thread|Paper Watchdog Thread|Async Chat Thread')" -eq 0 ]; then
[ "$(tail -20 $logfile | grep -cE 'Server thread|Paper Watchdog Thread|Async Chat Thread')" -eq 0 ]; then
if [ "$(tail -20 $logfile | grep -c 'ERROR]: Requested chunk')" -eq 1 ]; then
rm -rf $HOME/worlds/
fi