From 32ca5a8f2c99d834ffd559975650bf7abe92d5d7 Mon Sep 17 00:00:00 2001 From: Patrick McGuire <60325264+mcguirepr89@users.noreply.github.com> Date: Thu, 5 May 2022 16:52:22 -0400 Subject: [PATCH] Update update_birdnet_snippets.sh --- scripts/update_birdnet_snippets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update_birdnet_snippets.sh b/scripts/update_birdnet_snippets.sh index 1f30143..3c45174 100755 --- a/scripts/update_birdnet_snippets.sh +++ b/scripts/update_birdnet_snippets.sh @@ -7,10 +7,10 @@ HOME=$(awk -F: '/1000/ {print $6}' /etc/passwd) my_dir=$HOME/BirdNET-Pi/scripts if ! grep python3 <(head -n1 $my_dir/analyze.py) &>/dev/null;then echo "Ensure all python scripts use the virtual environment" - sed -si "1 i\\#\!$HOME/BirdNET-Pi/birdnet/bin/python3" $my_dir/*.py + sudo -u$USER sed -si "1 i\\#\!$HOME/BirdNET-Pi/birdnet/bin/python3" $my_dir/*.py fi if ! grep PRIVACY_MODE /etc/birdnet/birdnet.conf &>/dev/null;then - sudo -u${USER} echo "PRIVACY_MODE=off" >> /etc/birdnet/birdnet.conf + sudo -u$USER echo "PRIVACY_MODE=off" >> /etc/birdnet/birdnet.conf fi if ! which lsof &>/dev/null;then sudo apt update && sudo apt -y install lsof