diff --git a/requirements.txt b/requirements.txt index 8e747ea..081c5c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ pytz tzlocal pandas seaborn +basel diff --git a/scripts/advanced.php b/scripts/advanced.php new file mode 100644 index 0000000..2c38405 --- /dev/null +++ b/scripts/advanced.php @@ -0,0 +1,135 @@ + + + + +
+
+
+

Advanced Settings

+ + +
+ +
+ +
+ +
+ +
+

Passwords

+ +
+ +
+ +
+
+
+

Custom URLs

+ +
+ +
+ +
+

BirdNET-Lite Settings

+ +
+ +
+ +
+
+
+ "> +
+
+
+ + +
+
+ + diff --git a/scripts/config.php b/scripts/config.php new file mode 100644 index 0000000..4775895 --- /dev/null +++ b/scripts/config.php @@ -0,0 +1,108 @@ + + + +

Basic Settings

+ +
+
+
+ + +
+ + +

Optional Services

+ +
+ +
+ +
+
+ "> +
+
+ +
+
+
+ diff --git a/scripts/form.php b/scripts/form.php deleted file mode 100644 index f279ed5..0000000 --- a/scripts/form.php +++ /dev/null @@ -1,84 +0,0 @@ - - - Configure `birdnet.conf` - - -

Configure BirdNET-Pi

- -
- -

Required

- -
- -
- -
- -
- -
-
-
-

Optional Services

- -
- -
- -
-
-
-

Custom URLs

- -
- -
- -
-
-
-

Default Services

- -
- -
- -
-
-
-

Advanced Configuration

- -
- -
- -
- -
- -
- -
- -
-
- View Current Config - diff --git a/scripts/index.html b/scripts/index.html index 17e13d2..90a44fb 100644 --- a/scripts/index.html +++ b/scripts/index.html @@ -45,12 +45,12 @@ a { cursor: pointer; text-align: center; } -@media screen and (max-width: 800px) { - .column { - float: none; - width: 100%; + @media screen and (max-width: 800px) { + .column { + float: none; + width: 100%; + } } -}
@@ -79,9 +79,9 @@ a {
- -
- + + +
diff --git a/scripts/install_services.sh b/scripts/install_services.sh index e133a85..c3ea874 100755 --- a/scripts/install_services.sh +++ b/scripts/install_services.sh @@ -231,6 +231,7 @@ install_Caddyfile() { cp /etc/caddy/Caddyfile{,.original} fi php_version="$(awk -F'php' '{print $3}' <(ls -l $(which /etc/alternatives/php)))" + if ! [ -z ${CADDY_PWD} ];then HASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD}) cat << EOF > /etc/caddy/Caddyfile http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { @@ -252,6 +253,17 @@ http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { php_fastcgi unix//run/php/php${php_version}-fpm.sock } EOF + else + cat << EOF > /etc/caddy/Caddyfile +http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { + root * ${EXTRACTED} + file_server browse + reverse_proxy /stream localhost:8000 + php_fastcgi unix//run/php/php${php_version}-fpm.sock +} +EOF + fi + if [ ! -z ${EXTRACTIONLOG_URL} ];then cat << EOF >> /etc/caddy/Caddyfile diff --git a/scripts/update_services.sh b/scripts/update_services.sh index dbb64df..ebdfca3 100755 --- a/scripts/update_services.sh +++ b/scripts/update_services.sh @@ -228,6 +228,7 @@ install_Caddyfile() { cp /etc/caddy/Caddyfile{,.original} fi php_version="$(awk -F'php' '{print $3}' <(ls -l $(which /etc/alternatives/php)))" + if ! [ -z ${CADDY_PWD} ];then HASHWORD=$(caddy hash-password -plaintext ${CADDY_PWD}) cat << EOF > /etc/caddy/Caddyfile http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { @@ -249,6 +250,17 @@ http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { php_fastcgi unix//run/php/php${php_version}-fpm.sock } EOF + else + cat << EOF > /etc/caddy/Caddyfile +http://localhost http://birdnetpi.local ${BIRDNETPI_URL} { + root * ${EXTRACTED} + file_server browse + reverse_proxy /stream localhost:8000 + php_fastcgi unix//run/php/php${php_version}-fpm.sock +} +EOF + fi + if [ ! -z ${EXTRACTIONLOG_URL} ];then cat << EOF >> /etc/caddy/Caddyfile diff --git a/scripts/write_advanced.php b/scripts/write_advanced.php new file mode 100644 index 0000000..3be99c4 --- /dev/null +++ b/scripts/write_advanced.php @@ -0,0 +1,60 @@ + + diff --git a/scripts/write_config.php b/scripts/write_config.php index beb7bd3..4da9a4b 100644 --- a/scripts/write_config.php +++ b/scripts/write_config.php @@ -1,14 +1,33 @@ +