mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-13 16:34:22 +01:00
Update 30-monitoring.sh
This commit is contained in:
@@ -77,13 +77,15 @@ while true; do
|
||||
|
||||
bashio::log.green "$(date) INFO ${wavs} wav files waiting in $ingest_dir, $srv state is $state"
|
||||
|
||||
if ((wavs > 100)) && [[ "$state" == "active" ]]; then
|
||||
if ((wavs > 100)); then
|
||||
bashio::log.red "$(date) WARNING too many files in queue, pausing $srv"
|
||||
sudo systemctl stop "$srv"
|
||||
bashio::log.red "$(date) WARNING stopped $srv service"
|
||||
sudo systemctl restart birdnet_analysis
|
||||
if [ -s "$HOME/BirdNET-Pi/apprise.txt" ]; then apprisealert; fi
|
||||
elif ((wavs <= 100)) && [[ "$state" != "active" ]]; then
|
||||
sudo systemctl start $srv
|
||||
elif [[ "$state" != "active" ]]; then
|
||||
bashio::log.yellow "$(date) INFO started $srv service"
|
||||
sudo systemctl start $srv
|
||||
sudo systemctl restart birdnet_analysis
|
||||
fi
|
||||
|
||||
((counter--))
|
||||
|
||||
Reference in New Issue
Block a user