No need to see the grepping
This commit is contained in:
@@ -5,11 +5,11 @@ trap 'exit 1' SIGINT SIGHUP
|
|||||||
USER=$(awk -F: '/1000/ {print $1}' /etc/passwd)
|
USER=$(awk -F: '/1000/ {print $1}' /etc/passwd)
|
||||||
HOME=$(awk -F: '/1000/ {print $6}' /etc/passwd)
|
HOME=$(awk -F: '/1000/ {print $6}' /etc/passwd)
|
||||||
my_dir=$HOME/BirdNET-Pi/scripts
|
my_dir=$HOME/BirdNET-Pi/scripts
|
||||||
if ! grep python3 <(head -n1 $my_dir/analyze.py);then
|
if ! grep python3 <(head -n1 $my_dir/analyze.py) &>/dev/null;then
|
||||||
echo "Ensure all python scripts use the virtual environment"
|
echo "Ensure all python scripts use the virtual environment"
|
||||||
sed -si "1 i\\#\!$HOME/BirdNET-Pi/birdnet/bin/python3" $my_dir/*.py
|
sed -si "1 i\\#\!$HOME/BirdNET-Pi/birdnet/bin/python3" $my_dir/*.py
|
||||||
fi
|
fi
|
||||||
if ! grep PRIVACY_MODE /etc/birdnet/birdnet.conf;then
|
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
|
fi
|
||||||
if ! which lsof &>/dev/null;then
|
if ! which lsof &>/dev/null;then
|
||||||
|
|||||||
Reference in New Issue
Block a user