From 4724b1781fa5543a15f8eef1cdba9b79b0b89764 Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Fri, 11 Feb 2022 14:37:28 -0500 Subject: [PATCH] now the birdnet_analysis waits for the socket --- scripts/birdnet_analysis.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.sh index aa04b7b..e77f853 100755 --- a/scripts/birdnet_analysis.sh +++ b/scripts/birdnet_analysis.sh @@ -124,6 +124,12 @@ run_analysis() { done fi + if ! grep 5050 <(netstat -tulpn 2>&1) &> /dev/null 2>&1;then + echo "Waiting for socket" + until grep 5050 <(netstat -tulpn 2>&1) &> /dev/null 2>&1;do + sleep 1 + done + fi if [ -f ${1}/${i} ] && [ ! -f ${INCLUDE_LIST} ] && [ ! -f ${EXCLUDE_LIST} ] && [ -z $BIRDWEATHER_ID ];then echo "python3 analyze.py \ --i "${1}/${i}" \