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
+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