From ca09725e81b096fe6f6f9d60ef09f0c02eca19ba Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Tue, 28 Jun 2022 14:18:05 -0400 Subject: [PATCH] Update weekly_report.sh --- scripts/weekly_report.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/weekly_report.sh b/scripts/weekly_report.sh index f52f4d2..db605d2 100755 --- a/scripts/weekly_report.sh +++ b/scripts/weekly_report.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash source /etc/birdnet/birdnet.conf -echo ${APPRISE_WEEKLY_REPORT} - -NOTIFICATION=$(curl 'localhost/views.php?view=Weekly%20Report&ascii=true') -NOTIFICATION=${NOTIFICATION#*#} -firstLine=`echo "${NOTIFICATION}" | head -1` -NOTIFICATION=`echo "${NOTIFICATION}" | tail -n +2` -$HOME/BirdNET-Pi/birdnet/bin/apprise -vv -t "${firstLine}" -b "${NOTIFICATION}" --config=$HOME/BirdNET-Pi/apprise.txt \ No newline at end of file +if [ ${APPRISE_WEEKLY_REPORT} == 1 ];then + NOTIFICATION=$(curl 'localhost/views.php?view=Weekly%20Report&ascii=true') + NOTIFICATION=${NOTIFICATION#*#} + firstLine=`echo "${NOTIFICATION}" | head -1` + NOTIFICATION=`echo "${NOTIFICATION}" | tail -n +2` + $HOME/BirdNET-Pi/birdnet/bin/apprise -vv -t "${firstLine}" -b "${NOTIFICATION}" --config=$HOME/BirdNET-Pi/apprise.txt +fi \ No newline at end of file