diff --git a/tar1090.sh b/tar1090.sh index fa8e64a..60c7e0d 100755 --- a/tar1090.sh +++ b/tar1090.sh @@ -162,6 +162,9 @@ while true; do next_error=0 error_printed=0 while ! [[ -f "$SRC_DIR/aircraft.json" ]] || ! prune "$SRC_DIR/aircraft.json" "history_$date.json"; do + if ! [[ -f chunks.json ]]; then + break + fi now=$(date +%s%N | head -c-7) if (( now > next_error )); then if (( next_error != 0 )); then