possible workaround for notorious bug

This commit is contained in:
ehpersonal38
2023-02-17 12:03:49 -05:00
parent 260402de0d
commit b0676c8217
+6
View File
@@ -100,7 +100,13 @@ run_analysis() {
echo "${1}/${i}" > $HOME/BirdNET-Pi/analyzing_now.txt
[ -z ${RECORDING_LENGTH} ] && RECORDING_LENGTH=15
echo "RECORDING_LENGTH set to ${RECORDING_LENGTH}"
itr=0
until [ -z "$(lsof -t ${1}/${i})" ];do
itr=$((itr+1))
if [ $itr -eq 30 ]; then
echo "Maximum number of attempts exceeded. Exiting & restarting service."
exit
fi
sleep 2
done