mirror of
https://github.com/kaboomserver/buildpack.git
synced 2024-09-28 19:23:01 +00:00
Simpler log time check
This commit is contained in:
parent
d902e0e695
commit
28080b2660
|
@ -10,8 +10,7 @@ while true; do
|
|||
fi
|
||||
pkill -9 java
|
||||
elif [ -f "$logfile" ]; then
|
||||
date="$(tail -1 $logfile | grep -oP '(?<=\[).*?(?=\])' | head -1 | date -f - +%s)"
|
||||
if [ "$(( $(date +%s) - ${date:=$(date +%s)} ))" -gt 180 ]; then
|
||||
if [ "$(( $(date +%s) - $(date -r $logfile +%s) ))" -gt 180 ]; then
|
||||
if [ "$(tail -20 $logfile | grep -c 'ERROR]: Requested chunk')" -eq 1 ]; then
|
||||
rm -rf $HOME/worlds/
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue