bookwork fix: make php version independant
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ if(isset($_GET['threshold'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['restart_php']) && $_GET['restart_php'] == "true") {
|
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();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ http:// ${BIRDNETPI_URL} {
|
|||||||
birdnet ${HASHWORD}
|
birdnet ${HASHWORD}
|
||||||
}
|
}
|
||||||
reverse_proxy /stream localhost:8000
|
reverse_proxy /stream localhost:8000
|
||||||
php_fastcgi unix//run/php/php7.4-fpm.sock
|
php_fastcgi unix//run/php/php-fpm.sock
|
||||||
reverse_proxy /log* localhost:8080
|
reverse_proxy /log* localhost:8080
|
||||||
reverse_proxy /stats* localhost:8501
|
reverse_proxy /stats* localhost:8501
|
||||||
reverse_proxy /terminal* localhost:8888
|
reverse_proxy /terminal* localhost:8888
|
||||||
@@ -201,7 +201,7 @@ http:// ${BIRDNETPI_URL} {
|
|||||||
file_server browse
|
file_server browse
|
||||||
}
|
}
|
||||||
reverse_proxy /stream localhost:8000
|
reverse_proxy /stream localhost:8000
|
||||||
php_fastcgi unix//run/php/php7.4-fpm.sock
|
php_fastcgi unix//run/php/php-fpm.sock
|
||||||
reverse_proxy /log* localhost:8080
|
reverse_proxy /log* localhost:8080
|
||||||
reverse_proxy /stats* localhost:8501
|
reverse_proxy /stats* localhost:8501
|
||||||
reverse_proxy /terminal* localhost:8888
|
reverse_proxy /terminal* localhost:8888
|
||||||
@@ -324,7 +324,7 @@ EOF
|
|||||||
configure_caddy_php() {
|
configure_caddy_php() {
|
||||||
echo "Configuring PHP for Caddy"
|
echo "Configuring PHP for Caddy"
|
||||||
sed -i 's/www-data/caddy/g' /etc/php/*/fpm/pool.d/www.conf
|
sed -i 's/www-data/caddy/g' /etc/php/*/fpm/pool.d/www.conf
|
||||||
systemctl restart php7\*-fpm.service
|
systemctl restart php\*-fpm.service
|
||||||
echo "Adding Caddy sudoers rule"
|
echo "Adding Caddy sudoers rule"
|
||||||
cat << EOF > /etc/sudoers.d/010_caddy-nopasswd
|
cat << EOF > /etc/sudoers.d/010_caddy-nopasswd
|
||||||
caddy ALL=(ALL) NOPASSWD: ALL
|
caddy ALL=(ALL) NOPASSWD: ALL
|
||||||
|
|||||||
@@ -100,6 +100,10 @@ if grep -q 'birdnet_server.service' "$HOME/BirdNET-Pi/templates/birdnet_analysis
|
|||||||
systemctl daemon-reload && restart_services.sh
|
systemctl daemon-reload && restart_services.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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 ];then
|
if [ -L /usr/local/bin/analyze.py ];then
|
||||||
rm -f /usr/local/bin/analyze.py
|
rm -f /usr/local/bin/analyze.py
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ http:// ${BIRDNETPI_URL} {
|
|||||||
birdnet ${HASHWORD}
|
birdnet ${HASHWORD}
|
||||||
}
|
}
|
||||||
reverse_proxy /stream localhost:8000
|
reverse_proxy /stream localhost:8000
|
||||||
php_fastcgi unix//run/php/php7.4-fpm.sock
|
php_fastcgi unix//run/php/php-fpm.sock
|
||||||
reverse_proxy /log* localhost:8080
|
reverse_proxy /log* localhost:8080
|
||||||
reverse_proxy /stats* localhost:8501
|
reverse_proxy /stats* localhost:8501
|
||||||
reverse_proxy /terminal* localhost:8888
|
reverse_proxy /terminal* localhost:8888
|
||||||
@@ -55,7 +55,7 @@ http:// ${BIRDNETPI_URL} {
|
|||||||
file_server browse
|
file_server browse
|
||||||
}
|
}
|
||||||
reverse_proxy /stream localhost:8000
|
reverse_proxy /stream localhost:8000
|
||||||
php_fastcgi unix//run/php/php7.4-fpm.sock
|
php_fastcgi unix//run/php/php-fpm.sock
|
||||||
reverse_proxy /log* localhost:8080
|
reverse_proxy /log* localhost:8080
|
||||||
reverse_proxy /stats* localhost:8501
|
reverse_proxy /stats* localhost:8501
|
||||||
reverse_proxy /terminal* localhost:8888
|
reverse_proxy /terminal* localhost:8888
|
||||||
|
|||||||
Reference in New Issue
Block a user