Skip to content

A live bird collage card for your Home Assistant dashboard.

changing EXTRACTIONS_URL to BIRDNETPI_URL

Patrick McGuire3698618063d7
diff --git a/Birders_Guide_Installer.sh b/Birders_Guide_Installer.sh
index de5d05ef..9003a9f2 100755
--- a/Birders_Guide_Installer.sh
+++ b/Birders_Guide_Installer.sh
@@ -238,13 +238,13 @@ DO_RECORDING=y
# Leave these EMPTY if you do not want to enable web access #
-## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
+## BIRDNETPI_URL is the URL where the extractions, data-set, and live-stream
## will be web-hosted. If you do not own a domain, or would just prefer to keep
-## the BirdNET-Pi on your local network, you can set this to http://localhost.
-## Setting this (even to http://localhost) will also allow you to enable the
+## the BirdNET-Pi on your local network, you can set this to
+## http://birdnetpi.local. Setting this will also allow you to enable the
## GoTTY web logging features below.
-EXTRACTIONS_URL=http://birdnetpi.local
+BIRDNETPI_URL=http://birdnetpi.local
## CADDY_PWD is the plaintext password (that will be hashed) and used to access
## the "Processed" directory and live audio stream. This MUST be set if you
diff --git a/birdnet.conf-defaults b/birdnet.conf-defaults
index f3de83ce..160884f3 100644
--- a/birdnet.conf-defaults
+++ b/birdnet.conf-defaults
@@ -59,13 +59,13 @@ DO_RECORDING=
# Leave these EMPTY if you do not want to enable web access #
-## EXTRACTIONS_URL is the URL where the extractions, data-set, and live-stream
+## BIRDNETPI_URL is the URL where the extractions, data-set, and live-stream
## will be web-hosted. If you do not own a domain, or would just prefer to keep
## BirdNET-Pi on your local network, you can set this to http://localhost.
## Setting this (even to http://localhost) will also allow you to enable the
## GoTTY web logging features below.
-EXTRACTIONS_URL=
+BIRDNETPI_URL=
## CADDY_PWD is the plaintext password (that will be hashed) and used to access
## the "Processed" directory and live audio stream. This MUST be set if you
diff --git a/scripts/install_services.sh b/scripts/install_services.sh
index d67cc0c3..68226987 100755
--- a/scripts/install_services.sh
+++ b/scripts/install_services.sh
@@ -120,11 +120,11 @@ create_necessary_dirs() {
fi
[ -L ${EXTRACTED}/scripts ] || sudo -u ${USER} ln -s $(dirname ${my_dir})/scripts ${EXTRACTED}
- if [ ! -z ${EXTRACTIONS_URL} ];then
- EXTRACTIONS_URL="$(echo ${EXTRACTIONS_URL} | sed 's/\/\//\\\/\\\//g')"
+ if [ ! -z ${BIRDNETPI_URL} ];then
+ BIRDNETPI_URL="$(echo ${BIRDNETPI_URL} | sed 's/\/\//\\\/\\\//g')"
phpfiles="$(grep -l birdnetpi.local ${my_dir}/*.php)"
for i in "${phpfiles[@]}";do
- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local/"${EXTRACTIONS_URL}"/g" ${i}
+ sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local/"${BIRDNETPI_URL}"/g" ${i}
done
fi
@@ -198,7 +198,7 @@ install_Caddyfile() {
fi
HASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD})
cat << EOF > /etc/caddy/Caddyfile
-${EXTRACTIONS_URL} {
+http://birdnetpi.local ${BIRDNETPI_URL} {
root * ${EXTRACTED}
file_server browse
basicauth /Processed* {
@@ -455,7 +455,7 @@ install_selected_services() {
install_recording_service
fi
- if [ ! -z "${EXTRACTIONS_URL}" ];then
+ if [ ! -z "${BIRDNETPI_URL}" ];then
install_caddy
install_Caddyfile
install_avahi_aliases
diff --git a/scripts/update_services.sh b/scripts/update_services.sh
index 2e0c76db..55762164 100755
--- a/scripts/update_services.sh
+++ b/scripts/update_services.sh
@@ -120,11 +120,11 @@ create_necessary_dirs() {
fi
[ -L ${EXTRACTED}/scripts ] || sudo -u ${USER} ln -s $(dirname ${my_dir})/scripts ${EXTRACTED}
- if [ ! -z ${EXTRACTIONS_URL} ];then
- EXTRACTIONS_URL="$(echo ${EXTRACTIONS_URL} | sed 's/\/\//\\\/\\\//g')"
+ if [ ! -z ${BIRDNETPI_URL} ];then
+ BIRDNETPI_URL="$(echo ${BIRDNETPI_URL} | sed 's/\/\//\\\/\\\//g')"
phpfiles="$(grep -l birdnetpi.local ${my_dir}/*.php)"
for i in "${phpfiles[@]}";do
- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local/"${EXTRACTIONS_URL}"/g" ${i}
+ sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local/"${BIRDNETPI_URL}"/g" ${i}
done
fi
@@ -198,7 +198,7 @@ install_Caddyfile() {
fi
HASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD})
cat << EOF > /etc/caddy/Caddyfile
-${EXTRACTIONS_URL} {
+http://birdnetpi.local ${BIRDNETPI_URL} {
root * ${EXTRACTED}
file_server browse
basicauth /Processed* {
@@ -454,7 +454,7 @@ install_selected_services() {
install_recording_service
fi
- if [ ! -z "${EXTRACTIONS_URL}" ];then
+ if [ ! -z "${BIRDNETPI_URL}" ];then
install_caddy
install_Caddyfile
install_avahi_aliases
diff --git a/templates/Caddyfile_livestream b/templates/Caddyfile_livestream
index ad4a10dc..53f522b8 100644
--- a/templates/Caddyfile_livestream
+++ b/templates/Caddyfile_livestream
@@ -1,15 +1,4 @@
-${EXTRACTIONS_URL} {
- root * ${EXTRACTED}
- file_server browse
- basicauth ${PROCESSED}* {
- birdnet ${HASHWORD}
- }
- basicauth /stream {
- birdnet ${HASHWORD}
- }
- reverse_proxy /stream localhost:8000
-}
-http://birdnetpi.local {
+http://birdnetpi.local ${BIRDNETPI_URL} {
root * ${EXTRACTED}
file_server browse
basicauth ${PROCESSED}* {
@@ -26,6 +15,3 @@ http://birdlog.local {
http://extractionlog.local {
reverse_proxy localhost:8888
}
-http://birdterminal.local {
- reverse_proxy localhost:9111
-}
diff --git a/templates/Caddyfile_nostream b/templates/Caddyfile_nostream
index eef82f89..f60161f6 100644
--- a/templates/Caddyfile_nostream
+++ b/templates/Caddyfile_nostream
@@ -1,14 +1,4 @@
-${EXTRACTIONS_URL} {
- root * ${EXTRACTED}
- file_server browse
- basicauth ${PROCESSED}* {
- birdnet ${HASHWORD}
- }
- basicauth /stream {
- birdnet ${HASHWORD}
- }
-}
-http://birdnetpi.local {
+http://birdnetpi.local ${BIRDNETPI_URL} {
root * ${EXTRACTED}
file_server browse
basicauth ${PROCESSED}* {
@@ -24,6 +14,3 @@ http://birdlog.local {
http://extractionlog.local {
reverse_proxy localhost:8888
}
-http://birdterminal.local {
- reverse_proxy localhost:9111
-}