From b9adc7008c220ea9669a9b2324981caf251072bb Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:27:04 +0200 Subject: [PATCH] Add sleep after restart --- birdnet-pi/rootfs/custom-services.d/30-monitoring.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh b/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh index 976e85a9f..67ad729ef 100755 --- a/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh +++ b/birdnet-pi/rootfs/custom-services.d/30-monitoring.sh @@ -76,9 +76,11 @@ while true; do log_red "$(date) WARNING: Too many files in queue, pausing $srv and restarting $srv2" sudo systemctl stop "$srv" sudo systemctl restart "$srv2" + sleep 30 elif ((wav_count > 30)); then log_red "$(date) WARNING: Too many files in queue, restarting $srv2" sudo systemctl restart "$srv2" + sleep 30 fi # Check service states