dev #1

Merged
sortion merged 26 commits from dev into main 2022-08-25 06:02:34 +02:00
5 changed files with 2856 additions and 2886 deletions
Showing only changes of commit ed92c9ddea - Show all commits

View File

@ -16,6 +16,7 @@ CHUNK_FOLDER="./var/chunks"
AUDIO_DEVICE="default"
# Virtual env for BirdNET AI with required packages
PYTHON_VENV="./.venv/birdnet-stream"
WORKDIR="/home/$USER/BirdNET-stream"
# Database location
DATABASE="./var/db.sqlite"

View File

@ -165,15 +165,16 @@ setup_http_server() {
sudo ln -s /etc/nginx/sites-available/birdnet-stream.conf /etc/nginx/sites-enabled/birdnet-stream.conf
debug "Info: Please edit /etc/nginx/sites-available/birdnet-stream.conf to set the correct server name and paths"
debug "Setup nginx variables the best way possible"
sudo sed -i "s|<SYMFONY_PUBLIC>|$WORKDIR/www/public/|g" /etc/nginx/sites-available/birdnet-stream.conf
sudo sed -i "s|<RECORDS_FOLDER>|$CHUNK_FOLDER/out|g" /etc/nginx/sites-available/birdnet-stream.conf
sudo sed -i "s|<CHARTS_FOLDER>|$WORKDIR/var/charts|g" /etc/nginx/sites-available/birdnet-stream.conf
debug "Generate self signed certificate"
CERTS_LOCATION="/etc/nginx/certs/birdnet"
sudo mkdir -p "$CERTS_LOCATION"
cd $CERTS_LOCATION
openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out fullchain.pem -sha256 -days 365 -nodes --subj '/CN=birdnet.lan'
sudo sed -i "s|<CERTIFICATE>|$CERTS_LOCATION/birdnet/fullchain.pem|g" /etc/nginx/sites-available/birdnet-stream.conf
sudo sed -i "s|<PRIVATE_KEY>|$CERTS_LOCATION/birdnet/privkey.pem|g" /etc/nginx/sites-available/birdnet-stream.conf
sudo openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out fullchain.pem -sha256 -days 365 -nodes --subj '/CN=birdnet.lan'
sudo sed -i "s|<CERTIFICATE>|$CERTS_LOCATION/fullchain.pem|g" /etc/nginx/sites-available/birdnet-stream.conf
sudo sed -i "s|<PRIVATE_KEY>|$CERTS_LOCATION/privkey.pem|g" /etc/nginx/sites-available/birdnet-stream.conf
sudo systemctl enable --now nginx
sudo systemctl restart nginx
cd -
@ -205,16 +206,17 @@ install_config() {
update_permissions() {
debug "Updating permissions (may not work properly)"
sudo chown -R "$USER":"birdnet" "$WORKDIR"
sudo chown -R "$USER":"birdnet" "$CHUNK_FOLDER"
sudo chown -R $USER:birdnet "$WORKDIR"
sudo chown -R $USER:birdnet "$CHUNK_FOLDER"
sudo chmod -R 755 "$CHUNK_FOLDER"
}
main() {
install_requirements "$REQUIREMENTS"
# install_birdnetstream
# install_birdnetstream_services
install_birdnetstream
install_birdnetstream_services
install_web_interface
setup_http_server
install_config
update_permissions
debug "Installation done"

View File

@ -42,7 +42,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/www.sock;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}

View File

@ -6,7 +6,6 @@
"core-js": "^3.23.0",
"git-revision-webpack-plugin": "^5.0.0",
"regenerator-runtime": "^0.13.9",
"webpack": "^5.74.0",
"webpack-notifier": "^1.15.0"
},
"license": "UNLICENSED",

File diff suppressed because it is too large Load Diff