update config

This commit is contained in:
frederik
2025-09-06 18:47:42 +02:00
parent 6fb19bc7ab
commit 2ce355a2ae
2 changed files with 10 additions and 1 deletions
+4 -1
View File
@@ -100,7 +100,6 @@ RTSP_STREAM_TO_LIVESTREAM="0"
#----------------------- Apprise Miscellanous Configuration -------------------#
APPRISE_NOTIFICATION_TITLE="New BirdNET-Pi Detection"
APPRISE_NOTIFICATION_BODY="A \$comname (\$sciname) was just detected with a confidence of \$confidence (\$reason)"
APPRISE_NOTIFY_EACH_DETECTION=0
APPRISE_NOTIFY_NEW_SPECIES=0
APPRISE_WEEKLY_REPORT=1
@@ -299,3 +298,7 @@ chmod g+w ${birdnet_conf}
[ -d /etc/birdnet ] || sudo mkdir /etc/birdnet
sudo ln -sf $birdnet_conf /etc/birdnet/birdnet.conf
grep -ve '^#' -e '^$' /etc/birdnet/birdnet.conf > $my_dir/firstrun.ini
source /etc/birdnet/birdnet.conf
echo 'A $comname ($sciname) was just detected with a confidence of $confidence ($reason)' | sudo -u $BIRDNET_USER tee "$HOME/BirdNET-Pi/body.txt"
chmod g+w "$HOME/BirdNET-Pi/body.txt"
+6
View File
@@ -92,6 +92,12 @@ SRC='^APPRISE_NOTIFICATION_BODY="A \$comname \(\$sciname\) was just detected wi
DST='APPRISE_NOTIFICATION_BODY="A \$comname (\$sciname) was just detected with a confidence of \$confidence (\$reason)"'
sed -i --follow-symlinks -E "s/$SRC/$DST/" /etc/birdnet/birdnet.conf
if ! [ -f $HOME/BirdNET-Pi/body.txt ];then
grep -E '^APPRISE_NOTIFICATION_BODY=".*"' birdnet.conf | cut -d '"' -f 2 | sudo_with_user tee "$HOME/BirdNET-Pi/body.txt"
chmod g+w "$HOME/BirdNET-Pi/body.txt"
sed -i --follow-symlinks -E 's/^APPRISE_NOTIFICATION_BODY=/#APPRISE_NOTIFICATION_BODY=/' /etc/birdnet/birdnet.conf
fi
if ! grep -E '^INFO_SITE=' /etc/birdnet/birdnet.conf &>/dev/null;then
echo "INFO_SITE=\"ALLABOUTBIRDS\"" >> /etc/birdnet/birdnet.conf
fi