A live bird collage card for your Home Assistant dashboard.
Update disk_check.sh
ehpersonal38aa0372079fee
diff --git a/scripts/disk_check.sh b/scripts/disk_check.shindex 635cee19..e7a60a85 100755--- a/scripts/disk_check.sh+++ b/scripts/disk_check.sh@@ -9,9 +9,10 @@ if [ "${used//%}" -ge 95 ]; thenpurge) echo "Removing oldest data"cd ${EXTRACTED}/By_Date/curl localhost/views.php?view=Species%20Stats &>/dev/null+ filestodelete=$(($(find ${EXTRACTED}/By_Date/* -type f | wc -l) / $(find ${EXTRACTED}/By_Date/* -maxdepth 0 -type d | wc -l)))iter=0for i in */*/*; do- if [ $iter -ge 250 ]; then+ if [ $iter -ge $filestodelete ]; thenbreakfiif ! grep -qxFe "$i" $HOME/BirdNET-Pi/scripts/disk_check_exclude.txt; then