A live bird collage card for your Home Assistant dashboard.
more responsive birdnet_analysis.service
Patrick McGuire9de946d72d20
diff --git a/scripts/extract_new_birdsounds.sh b/scripts/extract_new_birdsounds.shindex 7dd34bf6..946dd1cd 100755--- a/scripts/extract_new_birdsounds.sh+++ b/scripts/extract_new_birdsounds.sh@@ -115,11 +115,11 @@ for h in "${SCAN_DIRS[@]}";do# If there are already 20 extracted entries for a given species# for today, remove the oldest file and create the new one.- if [[ "$(find ${NEWSPECIES_BYDATE} | wc -l)" -ge 21 ]];then- echo "20 ${SPECIES}s, already! Removing the oldest by-date and making a new one"- cd ${NEWSPECIES_BYDATE} || exit 1- ls -1t . | tail -n +21 | xargs -r rm -vv- fi+ # if [[ "$(find ${NEWSPECIES_BYDATE} | wc -l)" -ge 21 ]];then+ # echo "20 ${SPECIES}s, already! Removing the oldest by-date and making a new one"+ # cd ${NEWSPECIES_BYDATE} || exit 1+ # ls -1t . | tail -n +21 | xargs -r rm -vv+ # fiecho "Extracting audio . . . "# If the above tests have passed, then the extraction happens.diff --git a/scripts/install_services.sh b/scripts/install_services.shindex 994190e0..c86503f5 100755--- a/scripts/install_services.sh+++ b/scripts/install_services.sh@@ -23,7 +23,7 @@ Description=BirdNET AnalysisRestart=alwaysRuntimeMaxSec=10800Type=simple-RestartSec=3+RestartSec=1User=${USER}ExecStart=/usr/local/bin/birdnet_analysis.sh[Install]diff --git a/templates/birdnet_analysis.service b/templates/birdnet_analysis.serviceindex 0986adbe..0817d896 100644--- a/templates/birdnet_analysis.service+++ b/templates/birdnet_analysis.service@@ -6,7 +6,7 @@ After=network-online.target ${SYSTEMD_MOUNT}[Service]Restart=alwaysType=simple-RestartSec=3+RestartSec=1User=${BIRDNET_USER}ExecStart=/usr/local/bin/birdnet_analysis.sh