A live bird collage card for your Home Assistant dashboard.
bookwork fix: make php version independant
frederikc100d19da136
diff --git a/scripts/config.php b/scripts/config.phpindex ff070a2f..68b7c06f 100644--- a/scripts/config.php+++ b/scripts/config.php@@ -61,7 +61,7 @@ if(isset($_GET['threshold'])) {}if(isset($_GET['restart_php']) && $_GET['restart_php'] == "true") {- shell_exec("sudo service php7.4-fpm restart");+ shell_exec("sudo service php*-fpm restart");die();}diff --git a/scripts/install_services.sh b/scripts/install_services.shindex 15afe5ac..db71de88 100755--- a/scripts/install_services.sh+++ b/scripts/install_services.sh@@ -183,7 +183,7 @@ http:// ${BIRDNETPI_URL} {birdnet ${HASHWORD}}reverse_proxy /stream localhost:8000- php_fastcgi unix//run/php/php7.4-fpm.sock+ php_fastcgi unix//run/php/php-fpm.sockreverse_proxy /log* localhost:8080reverse_proxy /stats* localhost:8501reverse_proxy /terminal* localhost:8888@@ -201,7 +201,7 @@ http:// ${BIRDNETPI_URL} {file_server browse}reverse_proxy /stream localhost:8000- php_fastcgi unix//run/php/php7.4-fpm.sock+ php_fastcgi unix//run/php/php-fpm.sockreverse_proxy /log* localhost:8080reverse_proxy /stats* localhost:8501reverse_proxy /terminal* localhost:8888@@ -324,7 +324,7 @@ EOFconfigure_caddy_php() {echo "Configuring PHP for Caddy"sed -i 's/www-data/caddy/g' /etc/php/*/fpm/pool.d/www.conf- systemctl restart php7\*-fpm.service+ systemctl restart php\*-fpm.serviceecho "Adding Caddy sudoers rule"cat << EOF > /etc/sudoers.d/010_caddy-nopasswdcaddy ALL=(ALL) NOPASSWD: ALLdiff --git a/scripts/update_birdnet_snippets.sh b/scripts/update_birdnet_snippets.shindex d50b5a88..fd35c8c9 100755--- a/scripts/update_birdnet_snippets.sh+++ b/scripts/update_birdnet_snippets.sh@@ -100,6 +100,10 @@ if grep -q 'birdnet_server.service' "$HOME/BirdNET-Pi/templates/birdnet_analysissystemctl daemon-reload && restart_services.shfi+if grep -q 'php7.4-' /etc/caddy/Caddyfile &>/dev/null; then+ sed -i 's/php7.4-/php-/' /etc/caddy/Caddyfile+fi+if [ -L /usr/local/bin/analyze.py ];thenrm -f /usr/local/bin/analyze.pyfidiff --git a/scripts/update_caddyfile.sh b/scripts/update_caddyfile.shindex daa959a3..3f5e7016 100755--- a/scripts/update_caddyfile.sh+++ b/scripts/update_caddyfile.sh@@ -37,7 +37,7 @@ http:// ${BIRDNETPI_URL} {birdnet ${HASHWORD}}reverse_proxy /stream localhost:8000- php_fastcgi unix//run/php/php7.4-fpm.sock+ php_fastcgi unix//run/php/php-fpm.sockreverse_proxy /log* localhost:8080reverse_proxy /stats* localhost:8501reverse_proxy /terminal* localhost:8888@@ -55,7 +55,7 @@ http:// ${BIRDNETPI_URL} {file_server browse}reverse_proxy /stream localhost:8000- php_fastcgi unix//run/php/php7.4-fpm.sock+ php_fastcgi unix//run/php/php-fpm.sockreverse_proxy /log* localhost:8080reverse_proxy /stats* localhost:8501reverse_proxy /terminal* localhost:8888