From b786c01601ae7fbe63c33c98c5e810d458c02b5f Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 3 Jun 2024 07:22:55 +0200 Subject: [PATCH] Restart if different than active --- birdnet-pi/rootfs/custom-services.d/30-monitoring.sh | 2 +- 1 file changed, 1 insertion(+), 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 f9a27a152..59ad2d419 100755 --- a/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh +++ b/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh @@ -51,7 +51,7 @@ while true; do if (( wavs > 100 )) && [[ "$state" == "active" ]]; then sudo systemctl stop "$srv" bashio::log.red "$(date) WARNING stopped $srv service" - elif (( wavs <= 100 )) && [[ "$state" == "inactive" ]]; then + elif (( wavs <= 100 )) && [[ "$state" != "active" ]]; then sudo systemctl start $srv bashio::log.yellow "$(date) INFO started $srv service" fi