From 58f3b5e9907d0a940c3e85f6b3cbeeb91ab73945 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Mon, 28 Oct 2024 20:04:09 +0100 Subject: [PATCH] bail when chunks.json doesn't exist --- tar1090.sh | 3 +++ 1 file changed, 3 insertions(+) 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