From cd0e5d059f33945093ff5203d582f312bd915575 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 4 Feb 2025 12:03:24 +0100 Subject: [PATCH] Update 30-monitoring.sh --- birdnet-pi/rootfs/custom-services.d/30-monitoring.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh b/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh index 0a95058df..8fa618267 100755 --- a/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh +++ b/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh @@ -115,7 +115,8 @@ while true; do if [[ "$state" != "active" ]]; then log_yellow "$(date) INFO: Restarting $service service" sudo systemctl restart "$service" - wait 5 + sleep 5 + state="$(systemctl is-active "$service")" if [[ "$state" != "active" ]]; then log_red "$(date) WARNING: $service could not restart" apprisealert "$service cannot restart"