A live bird collage card for your Home Assistant dashboard.
cleanup.sh now checks for a backlog of raw audio
mcguirepr89ce017a9baea9
diff --git a/scripts/cleanup.sh b/scripts/cleanup.shindex 69cb22d7..72afe4ce 100755--- a/scripts/cleanup.sh+++ b/scripts/cleanup.sh@@ -1,5 +1,6 @@#!/usr/bin/env bashsource /etc/birdnet/birdnet.conf+set -xcd "${PROCESSED}" || exit 1empties=($(find ${PROCESSED} -size 57c))@@ -11,3 +12,7 @@ doneif [[ "$(find ${PROCESSED} | wc -l)" -ge 100 ]];thenls -1t . | tail -n +100 | xargs -r rm -vvfi++accumulated_files=$(find $RECS_DIR -path $PROCESSED -prune -o -type f -print | wc -l)+[ $accumulated_files -ge 10 ] && stop_core_services.sh+echo "$(date "+%b %e %I:%M:%S") Stopped Core Services -- Check raw recordings in $RECS_DIR" | sudo tee -a /var/log/syslog