From e4afa5245d2263709eb1074fc5d32b98353adc19 Mon Sep 17 00:00:00 2001 From: Patrick McGuire <60325264+mcguirepr89@users.noreply.github.com> Date: Mon, 18 Oct 2021 13:57:23 -0400 Subject: [PATCH] Update update_birdnet2.sh --- scripts/update_birdnet2.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/scripts/update_birdnet2.sh b/scripts/update_birdnet2.sh index 2926e69..cc9a1db 100755 --- a/scripts/update_birdnet2.sh +++ b/scripts/update_birdnet2.sh @@ -7,22 +7,12 @@ my_dir=${HOME}/BirdNET-Pi/scripts sudo ${my_dir}/update_services.sh # Stage 2 restarts the services -services=(avahi-alias@birdnetpi.local.service -birdnet_analysis.service -birdnet_log.service -birdnet_recording.service -edit_birdnet_conf.service -extraction_log.service -extraction.service -extraction.timer -livestream.service -pushed_notifications.service -spectrogram_viewer.service) +newservices=$(awk '/service/ && /systemctl/ && !/php/ {print $3}' ${my_dir}/install_services.sh | sort) -restart_services() { - for i in ${services[@]};do +restart_newservices() { + for i in ${newservices[@]};do sudo systemctl restart ${i} done } -restart_services +restart_newservices