Skip to content

A live bird collage card for your Home Assistant dashboard.

smarter restart_services

mcguirepr895d2b006e971e
diff --git a/scripts/restart_services.sh b/scripts/restart_services.sh
index 37227ac1..06c6c9fd 100755
--- a/scripts/restart_services.sh
+++ b/scripts/restart_services.sh
@@ -5,11 +5,11 @@ my_dir=/home/pi/BirdNET-Pi/scripts
sudo systemctl stop birdnet_recording.service
sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
-sudo systemctl start birdnet_recording.service
-
-services=($(awk '/systemctl/ && !/php/ && !/caddy/ && !/target/ {print $3}' <(sed -e 's/--now//g' ${my_dir}/update_services.sh) | sort | uniq ))
+services=($(awk '/systemctl/ && !/php/ && !/caddy/ && !/target/ && !/avahi/ {print $3}' <(sed -e 's/--now//g' ${my_dir}/update_services.sh) | sort | uniq ))
for i in "${services[@]}";do
sudo systemctl restart "${i}"
done
sudo systemctl restart extraction.timer
+sudo systemctl start birdnet_recording.service
+