A live bird collage card for your Home Assistant dashboard.
adjusting for bullseye installation
Patrick McGuirefa353927aa6f
diff --git a/Birders_Guide_Installer.sh b/Birders_Guide_Installer.shindex 6d102db6..a50a378a 100755--- a/Birders_Guide_Installer.sh+++ b/Birders_Guide_Installer.sh@@ -3,7 +3,7 @@ set -eUSER=piHOME=/home/pimy_dir=${HOME}/BirdNET-Pi-branch=main+branch=bullseyetrap '${my_dir}/scripts/dump_logs.sh && exit' EXIT SIGHUP SIGINTif [ "$(uname -m)" != "aarch64" ];thendiff --git a/newinstaller.sh b/newinstaller.shindex 81adc8c8..945ff7f4 100644--- a/newinstaller.sh+++ b/newinstaller.sh@@ -2,7 +2,7 @@# Simple new installerHOME=/home/piUSER=pi-branch=main+branch=bullseyesudo apt updateif ! which git &> /dev/null;thensudo apt -y install git@@ -10,6 +10,6 @@ figit clone -b ${branch} https://github.com/mcguirepr89/BirdNET-Pi.git ${HOME}/BirdNET-Piecho 'Now, run the following script- sudo -E ${HOME}/BirdNET-Pi/scripts/birdnet-pi-config+ /home/pi/BirdNET-Pi/scripts/birdnet-pi-config'diff --git a/scripts/birdnet-pi-config b/scripts/birdnet-pi-configindex 2560b51e..dd0720fe 100755--- a/scripts/birdnet-pi-config+++ b/scripts/birdnet-pi-config@@ -7,7 +7,7 @@#set -xbirdnetpi_dir=/home/pi/BirdNET-Pibirders_config=${birdnetpi_dir}/Birders_Guide_Installer_Configuration.txt-branch=main+branch=bullseyeINTERACTIVE=TrueASK_TO_REBOOT=0BLACKLIST=/etc/modprobe.d/raspi-blacklist.confdiff --git a/scripts/install_birdnet.sh b/scripts/install_birdnet.shindex ef1af1f6..d4624d68 100755--- a/scripts/install_birdnet.sh+++ b/scripts/install_birdnet.sh@@ -52,16 +52,21 @@ install_birdnet() {source ./birdnet/bin/activateecho "Upgrading pip, wheel, and setuptools"pip3 install --upgrade pip wheel setuptools- if [ ! -f $(dirname ${my_dir})/tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl ];then- echo "Fetching the TFLite pre-built binaries"- TFLITE_URL="https://drive.google.com/uc?export=download&id=1dlEbugFDJXs-YDBCUC6WjADVtIttWxZA"- curl -c /tmp/cookie ${TFLITE_URL}- CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"- TF_COOKIE="https://drive.google.com/uc?export=download&confirm=${CODE}&id=1dlEbugFDJXs-YDBCUC6WjADVtIttWxZA"- curl -Lb /tmp/cookie ${TF_COOKIE} -o tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl- fi++ python_version="$(awk -F. '{print $2}' <(ls -l $(which python3)))"+ # TFLite Pre-built binaires from https://github.com/PINTO0309/TensorflowLite-bin+ # Python 3.7+ if [ "$python_version" -eq 7 ];thenecho "Installing the TFLite bin wheel"pip3 install --upgrade tflite_runtime-2.6.0-cp37-none-linux_aarch64.whl+ fi++ # Python 3.9+ if [ "$python_version" -eq 9 ];then+ echo "Installing the TFLite bin wheel"+ pip3 install --upgrade tflite_runtime-2.6.0-cp39-none-linux_aarch64.whl+ fi+echo "Installing colorama==0.4.4"pip3 install colorama==0.4.4echo "Installing librosa"diff --git a/scripts/install_services.sh b/scripts/install_services.shindex 0797bd2b..7d7609ed 100755--- a/scripts/install_services.sh+++ b/scripts/install_services.sh@@ -210,6 +210,7 @@ install_Caddyfile() {cp /etc/caddy/Caddyfile{,.original}fiHASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD})+ php_version="$(awk -F. '{print $2}' <(ls -l $(which /etc/alternatives/php)))"cat << EOF > /etc/caddy/Caddyfilehttp://localhost http://birdnetpi.local ${BIRDNETPI_URL} {root * ${EXTRACTED}@@ -227,7 +228,7 @@ http://localhost http://birdnetpi.local ${BIRDNETPI_URL} {birdnet ${HASHWORD}}reverse_proxy /stream localhost:8000- php_fastcgi unix//run/php/php7.3-fpm.sock+ php_fastcgi unix//run/php/php7.${php_version}-fpm.sock}EOFif [ ! -z ${EXTRACTIONLOG_URL} ];then@@ -352,16 +353,16 @@ install_sox() {}install_php() {- if ! which php &> /dev/null || ! which php-fpm7.3 || ! apt list --installed | grep php-xml;then+ if ! which php &> /dev/null || ! which php-fpm || ! apt list --installed | grep php-xml;thenecho "Installing PHP modules"apt -qq update- apt install -qqy php php-fpm php7.3-mysql php-xml+ apt install -qqy php php-fpm php-mysql php-xmlelseecho "PHP and PHP-FPM installed"fiecho "Configuring PHP for Caddy"- sed -i 's/www-data/caddy/g' /etc/php/7.3/fpm/pool.d/www.conf- systemctl restart php7.3-fpm.service+ sed -i 's/www-data/caddy/g' /etc/php/*/fpm/pool.d/www.conf+ systemctl restart php7\*-fpm.serviceecho "Adding Caddy sudoers rule"cat << EOF > /etc/sudoers.d/010_caddy-nopasswdcaddy ALL=(ALL) NOPASSWD: ALLdiff --git a/tflite_runtime-2.6.0-cp39-none-linux_aarch64.whl b/tflite_runtime-2.6.0-cp39-none-linux_aarch64.whlnew file mode 100644index 00000000..cec87e27Binary files /dev/null and b/tflite_runtime-2.6.0-cp39-none-linux_aarch64.whl differ