A live bird collage card for your Home Assistant dashboard.
fixing `labels.txt` overwrite durring update
mcguirepr898fdcfc1fc6d0
diff --git a/scripts/update_birdnet.sh b/scripts/update_birdnet.shindex 43724ac0..a1842365 100755--- a/scripts/update_birdnet.sh+++ b/scripts/update_birdnet.sh@@ -50,6 +50,8 @@ remove_scripts() {remove_servicesremove_scripts+# Backup labels.txt+sudo -u${USER} cp -f ~/BirdNET-Pi/model/labels.txt{,.bak}# Stage 2 does a git pull to fetch new thingssudo -u${USER} git -C ${HOME}/BirdNET-Pi checkout -fsudo -u${USER} git -C ${HOME}/BirdNET-Pi pull -fdiff --git a/scripts/update_birdnet2.sh b/scripts/update_birdnet2.shindex 675321d9..efef66e6 100755--- a/scripts/update_birdnet2.sh+++ b/scripts/update_birdnet2.sh@@ -7,7 +7,7 @@ my_dir=${HOME}/BirdNET-Pi/scriptssudo ${my_dir}/update_services.sh# Stage 1.5: adding new birdnet.conf entries-if ! grep FULL_DISK ${birdnet_conf};then+if ! grep FULL_DISK ${birdnet_conf} &> /dev/null;thencat << EOF >> ${birdnet_conf}## FULL_DISK can be set to configure how the system reacts to a full disk@@ -18,6 +18,9 @@ FULL_DISK=purgeEOFfi+# Replace Backup labels.txt+sudo -u${USER} cp -f ~/BirdNET-Pi/model/labels.txt.bak ~/BirdNET-Pi/model/labels.txt+# Stage 2 restarts the servicesnewservices=($(awk '/systemctl/ && !/php/ && !/caddy/ && !/target/ {print $3}' <(sed -e 's/--now//g' ${my_dir}/update_services.sh) | sort | uniq ))for i in ${newservices[@]};do