From 6cc2e0b0fd92219fbdde7d1ce707ef8bb4f69f95 Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Wed, 11 May 2022 08:32:19 -0400 Subject: [PATCH] removing `a` iterator that removes files --- scripts/birdnet_analysis.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.sh index 582944f..b9dab47 100755 --- a/scripts/birdnet_analysis.sh +++ b/scripts/birdnet_analysis.sh @@ -95,11 +95,8 @@ run_analysis() { echo "${1}/${i}" > $HOME/BirdNET-Pi/analyzing_now.txt [ -z ${RECORDING_LENGTH} ] && RECORDING_LENGTH=15 echo "RECORDING_LENGTH set to ${RECORDING_LENGTH}" - a=0 until [ -z "$(lsof -t ${1}/${i})" ];do sleep 2 - [ $a -ge ${RECORDING_LENGTH} ] && rm -f ${1}/${i} && break - a=$((a+2)) done if ! grep 5050 <(netstat -tulpn 2>&1) &> /dev/null 2>&1;then