Merge branch 'main' of https://github.com/community-scripts/ProxmoxVED
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/tphakala/birdnet-go
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
libasound2 \
|
||||
sox \
|
||||
alsa-utils \
|
||||
ffmpeg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "birdnet" "tphakala/birdnet-go" "prebuild" "latest" "/opt/birdnet" "birdnet-go-linux-amd64.tar.gz"
|
||||
|
||||
msg_info "Setting up BirdNET"
|
||||
cp /opt/birdnet/birdnet-go /usr/local/bin/birdnet-go
|
||||
chmod +x /usr/local/bin/birdnet-go
|
||||
cp -r /opt/birdnet/libtensorflowlite_c.so /usr/local/lib/ || true
|
||||
ldconfig
|
||||
mkdir -p /opt/birdnet/data/clips
|
||||
msg_ok "Set up BirdNET"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/birdnet.service
|
||||
[Unit]
|
||||
Description=BirdNET
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/birdnet/data
|
||||
ExecStart=/usr/local/bin/birdnet-go realtime
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now birdnet
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -88,7 +88,6 @@ $STD ldconfig
|
||||
msg_ok "Compiled ffmpeg"
|
||||
|
||||
msg_info "Configuring Fireshare (Patience)"
|
||||
mkdir -p /opt/fireshare-data
|
||||
cd /opt
|
||||
$STD git clone https://github.com/ShaneIsrael/fireshare.git
|
||||
cd /opt/fireshare
|
||||
@@ -105,6 +104,7 @@ echo "/usr/local/nvidia/lib" >>/etc/ld.so.conf.d/nvidia.conf
|
||||
echo "/usr/local/nvidia/lib64" >>/etc/ld.so.conf.d/nvidia.conf
|
||||
ldconfig
|
||||
$STD .venv/bin/python -m pip install --no-cache-dir --break-system-packages --ignore-installed app/server
|
||||
cp .venv/bin/fireshare /usr/local/bin/fireshare
|
||||
export FLASK_APP="/opt/fireshare/app/server/fireshare:create_app()"
|
||||
export DATA_DIRECTORY=/data
|
||||
export VIDEO_DIRECTORY=/videos
|
||||
@@ -131,6 +131,7 @@ systemctl stop nginx
|
||||
cp /opt/fireshare/app/nginx/prod.conf /etc/nginx/nginx.conf
|
||||
sed -i 's/^user[[:space:]]\+nginx;/user root;/' /etc/nginx/nginx.conf
|
||||
sed -i 's|root[[:space:]]\+/app/build;|root /opt/fireshare/app/client/build;|' /etc/nginx/nginx.conf
|
||||
systemctl start nginx
|
||||
msg_ok "Configured Fireshare"
|
||||
|
||||
msg_info "Creating services"
|
||||
@@ -140,7 +141,7 @@ Description=Fireshare Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/fireshare
|
||||
WorkingDirectory=/opt/fireshare/app/server
|
||||
ExecStart=/opt/fireshare/.venv/bin/gunicorn --bind=127.0.0.1:5000 "fireshare:create_app(init_schedule=True)" --workers 3 --threads 3 --preload
|
||||
Restart=always
|
||||
EnvironmentFile=/opt/fireshare/fireshare.env
|
||||
|
||||
Reference in New Issue
Block a user