more responsive birdnet_analysis.service

This commit is contained in:
Patrick McGuire
2021-09-30 15:39:49 -04:00
parent fde5128336
commit 9de946d72d
3 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -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
# fi
echo "Extracting audio . . . "
# If the above tests have passed, then the extraction happens.
+1 -1
View File
@@ -23,7 +23,7 @@ Description=BirdNET Analysis
Restart=always
RuntimeMaxSec=10800
Type=simple
RestartSec=3
RestartSec=1
User=${USER}
ExecStart=/usr/local/bin/birdnet_analysis.sh
[Install]