From 5e919ff4c37e746d9ca97b5dcd4e9a070fec7fca Mon Sep 17 00:00:00 2001 From: Patrick McGuire <60325264+mcguirepr89@users.noreply.github.com> Date: Sat, 22 Jan 2022 17:38:37 -0500 Subject: [PATCH] Update birdnet_analysis.sh --- scripts/birdnet_analysis.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.sh index 80f49c2..33dae77 100755 --- a/scripts/birdnet_analysis.sh +++ b/scripts/birdnet_analysis.sh @@ -7,9 +7,10 @@ source /etc/birdnet/birdnet.conf # the birdnet.conf as it was the last time this script was called my_dir=$(realpath $(dirname $0)) if [ -z ${THIS_RUN} ];then THIS_RUN=/home/pi/BirdNET-Pi/thisrun.txt;fi +[ -f ${THIS_RUN} ] || touch ${THIS_RUN} && chmod g+w ${THIS_RUN} if [ -z ${LAST_RUN} ];then LAST_RUN=/home/pi/BirdNET-Pi/lastrun.txt;fi -if [ -z ${LATITUDE} ];then LATITUDE=-1;fi -if [ -z ${LONGITUDE} ];then LONGITUDE=-1;fi +[ -z ${LATITUDE} ] && echo "LATITUDE not set, exiting 1"; exit 1 +[ -z ${LONGITUDE} ] && echo "LONGITUDE not set, exiting 1"; exit 1 make_thisrun() { sleep .4 awk '!/#/ && !/^$/ {print}' /etc/birdnet/birdnet.conf \