Update 30-monitoring.sh

This commit is contained in:
Alexandre
2024-06-25 08:35:18 +02:00
committed by GitHub
parent 4e1ad58d6a
commit 68bb320caa

View File

@@ -51,7 +51,6 @@ function apprisemessage() {
fi fi
TITLE="BirdNET-Analyzer stopped" TITLE="BirdNET-Analyzer stopped"
$HOME/BirdNET-Pi/birdnet/bin/apprise -vv -t "$TITLE" -b "${NOTIFICATION}" --input-format=html --config="$HOME/BirdNET-Pi/apprise.txt" $HOME/BirdNET-Pi/birdnet/bin/apprise -vv -t "$TITLE" -b "${NOTIFICATION}" --input-format=html --config="$HOME/BirdNET-Pi/apprise.txt"
fi
} }
while true; do while true; do
@@ -81,7 +80,7 @@ while true; do
if ((wavs > 100)) && [[ "$state" == "active" ]]; then if ((wavs > 100)) && [[ "$state" == "active" ]]; then
sudo systemctl stop "$srv" sudo systemctl stop "$srv"
bashio::log.red "$(date) WARNING stopped $srv service" bashio::log.red "$(date) WARNING stopped $srv service"
if [ -s "$HOME/BirdNET-Pi/apprise.txt" ]; then apprisealert(); fi if [ -s "$HOME/BirdNET-Pi/apprise.txt" ]; then apprisealert; fi
elif ((wavs <= 100)) && [[ "$state" != "active" ]]; then elif ((wavs <= 100)) && [[ "$state" != "active" ]]; then
sudo systemctl start $srv sudo systemctl start $srv
bashio::log.yellow "$(date) INFO started $srv service" bashio::log.yellow "$(date) INFO started $srv service"