A live bird collage card for your Home Assistant dashboard.
Update update_birdnet_snippets.sh
Patrick McGuire32ca5a8f2c99
diff --git a/scripts/update_birdnet_snippets.sh b/scripts/update_birdnet_snippets.shindex 1f301433..3c451740 100755--- a/scripts/update_birdnet_snippets.sh+++ b/scripts/update_birdnet_snippets.sh@@ -7,10 +7,10 @@ HOME=$(awk -F: '/1000/ {print $6}' /etc/passwd)my_dir=$HOME/BirdNET-Pi/scriptsif ! grep python3 <(head -n1 $my_dir/analyze.py) &>/dev/null;thenecho "Ensure all python scripts use the virtual environment"- sed -si "1 i\\#\!$HOME/BirdNET-Pi/birdnet/bin/python3" $my_dir/*.py+ sudo -u$USER sed -si "1 i\\#\!$HOME/BirdNET-Pi/birdnet/bin/python3" $my_dir/*.pyfiif ! grep PRIVACY_MODE /etc/birdnet/birdnet.conf &>/dev/null;then- sudo -u${USER} echo "PRIVACY_MODE=off" >> /etc/birdnet/birdnet.conf+ sudo -u$USER echo "PRIVACY_MODE=off" >> /etc/birdnet/birdnet.conffiif ! which lsof &>/dev/null;thensudo apt update && sudo apt -y install lsof