From a1d2a05e563bc1cf89d793a98ebc9924c9c18c3f Mon Sep 17 00:00:00 2001 From: Patrick McGuire Date: Wed, 10 Nov 2021 13:26:50 -0500 Subject: [PATCH] updating update_services to match install_services --- scripts/install_services.sh | 3 +-- scripts/update_services.sh | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install_services.sh b/scripts/install_services.sh index 6977034..e340028 100755 --- a/scripts/install_services.sh +++ b/scripts/install_services.sh @@ -209,9 +209,8 @@ install_Caddyfile() { if [ -f /etc/caddy/Caddyfile ];then cp /etc/caddy/Caddyfile{,.original} fi - HASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD}) php_version="$(awk -F. '{print $2}' <(ls -l $(which /etc/alternatives/php)))" - echo "php_version=${php_version}" + HASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD}) cat << EOF > /etc/caddy/Caddyfile http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { root * ${EXTRACTED} diff --git a/scripts/update_services.sh b/scripts/update_services.sh index e9698ae..b20b7fd 100755 --- a/scripts/update_services.sh +++ b/scripts/update_services.sh @@ -207,6 +207,7 @@ install_Caddyfile() { if [ -f /etc/caddy/Caddyfile ];then cp /etc/caddy/Caddyfile{,.original} fi + php_version="$(awk -F. '{print $2}' <(ls -l $(which /etc/alternatives/php)))" HASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD}) cat << EOF > /etc/caddy/Caddyfile http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { @@ -225,7 +226,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 } EOF if [ ! -z ${EXTRACTIONLOG_URL} ];then