Skip to content

A live bird collage card for your Home Assistant dashboard.

hopefully fixing socket service hangup

mcguirepr8905247c73caf4
diff --git a/scripts/clear_all_data.sh b/scripts/clear_all_data.sh
index 31afdd1e..88c45f57 100755
--- a/scripts/clear_all_data.sh
+++ b/scripts/clear_all_data.sh
@@ -85,4 +85,6 @@ ln -sf $(dirname ${my_dir})/BirdDB.txt ${my_dir}/BirdDB.txt &&
echo "Dropping and re-creating database"
sudo /home/pi/BirdNET-Pi/scripts/createdb_bullseye.sh
echo "Restarting services"
-/usr/local/bin/restart_services.sh
+sudo systemctl stop birdnet_recording.service
+sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
+sudo systemctl start birdnet_recording.service
diff --git a/scripts/stop_core_services.sh b/scripts/stop_core_services.sh
index a2ce92c5..0d5eb980 100755
--- a/scripts/stop_core_services.sh
+++ b/scripts/stop_core_services.sh
@@ -4,6 +4,7 @@
services=(birdnet_recording.service
birdnet_analysis.service
+birdnet_server.service
chart_viewer.service
extraction.timer
spectrogram_viewer.service)
diff --git a/scripts/update_birdnet2.sh b/scripts/update_birdnet2.sh
index 651285fa..317fcd92 100755
--- a/scripts/update_birdnet2.sh
+++ b/scripts/update_birdnet2.sh
@@ -23,8 +23,21 @@ fi
sudo -u${USER} cp -f ~/BirdNET-Pi/model/labels.txt.bak ~/BirdNET-Pi/model/labels.txt
# Stage 2 restarts the services
-newservices=($(awk '/systemctl/ && !/php/ && !/caddy/ && !/vnc/ && !/avahi/ && !/target/ {print $3}' <(sed -e 's/--now//g' ${my_dir}/update_services.sh) | sort | uniq ))
-for i in ${newservices[@]};do
- sudo systemctl restart ${i}
+sudo systemctl daemon-reload
+sudo systemctl stop birdnet_recording.service
+sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
+services=(web_terminal.service
+spectrogram_viewer.service
+pushed_notifications.service
+livestream.service
+icecast2.service
+extraction.timer
+extraction.service
+chart_viewer.service
+birdnet_recording.service
+birdnet_log.service)
+
+for i in "${services[@]}";do
+sudo systemctl restart "${i}"
done
-sudo systemctl restart extraction.timer
+