A live bird collage card for your Home Assistant dashboard.
changed birdnet_stats.sh and added security to
Patrick McGuiref24c5923b0c2
diff --git a/scripts/birdnet_stats.sh b/scripts/birdnet_stats.shindex c6665973..809f1f77 100755--- a/scripts/birdnet_stats.sh+++ b/scripts/birdnet_stats.sh@@ -28,7 +28,12 @@ if [ "${a}" -ge "1" ];thenelseSOFAR=0fi-echo " -$a detections so far"+if [ $SOFAR = 1 ];then+ verbage=detection+else+ verbage=detections+fi+echo " -$a $verbage so far"echoecho " -$SOFAR species identified so far"echo@@ -39,7 +44,12 @@ while read -r line;doSPECIES=${SPECIES/_}[ -z ${SPECIES} ] && continueDETECTIONS="$(ls -1 ${EXTRACTED}/By_Date/*/${SPECIES}| wc -l)"- echo -e " | $line # of detections so far: ${DETECTIONS}\n"+ if [ ${DETECTIONS} = 1 ];then+ verbage=detection+ else+ verbage=detections+ fi+ echo -e "${DETECTIONS} $verbage for ${SPECIES//_/ }" | sortdone < ${IDFILE}fiechodiff --git a/scripts/install_services.sh b/scripts/install_services.shindex 74004074..54067618 100755--- a/scripts/install_services.sh+++ b/scripts/install_services.sh@@ -196,6 +196,9 @@ ${EXTRACTIONS_URL} {basicauth /Processed* {birdnet ${HASHWORD}}+ basicauth /scripts* {+ birdnet ${HASHWORD}+ }basicauth /stream {birdnet ${HASHWORD}}@@ -209,6 +212,9 @@ http://birdnetsystem.local {basicauth /Processed* {birdnet ${HASHWORD}}+ basicauth /scripts* {+ birdnet ${HASHWORD}+ }basicauth /stream {birdnet ${HASHWORD}}