mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-03 03:13:17 +02:00
tubearchivist: add bgutil POT provider and update yt-dlp to nightly (#16622)
This commit is contained in:
+37
-2
@@ -30,9 +30,35 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f /etc/systemd/system/bgutil-provider.service ]]; then
|
||||||
|
msg_info "Adding BgUtil POT Provider"
|
||||||
|
ensure_dependencies ffmpeg libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev pkg-config
|
||||||
|
fetch_and_deploy_gh_release "bgutil-ytdlp-pot-provider" "Brainicism/bgutil-ytdlp-pot-provider" "tarball"
|
||||||
|
cd /opt/bgutil-ytdlp-pot-provider/server
|
||||||
|
$STD npm ci
|
||||||
|
$STD npx tsc
|
||||||
|
cat <<EOF >/etc/systemd/system/bgutil-provider.service
|
||||||
|
[Unit]
|
||||||
|
Description=BgUtil YT-DLP POT Provider
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/bgutil-ytdlp-pot-provider/server
|
||||||
|
ExecStart=/usr/bin/node build/main.js
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now bgutil-provider
|
||||||
|
msg_ok "Added BgUtil POT Provider"
|
||||||
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "tubearchivist" "tubearchivist/tubearchivist"; then
|
if check_for_gh_release "tubearchivist" "tubearchivist/tubearchivist"; then
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
systemctl stop tubearchivist tubearchivist-celery tubearchivist-beat
|
systemctl stop bgutil-provider tubearchivist tubearchivist-celery tubearchivist-beat
|
||||||
msg_ok "Stopped Services"
|
msg_ok "Stopped Services"
|
||||||
|
|
||||||
create_backup \
|
create_backup \
|
||||||
@@ -58,8 +84,17 @@ function update_script() {
|
|||||||
mkdir -p /opt/yt_plugins/bgutil
|
mkdir -p /opt/yt_plugins/bgutil
|
||||||
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python --target /opt/yt_plugins/bgutil -r /opt/tubearchivist/backend/requirements.plugins.txt
|
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python --target /opt/yt_plugins/bgutil -r /opt/tubearchivist/backend/requirements.plugins.txt
|
||||||
fi
|
fi
|
||||||
|
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python -U --prerelease allow "yt-dlp[default]"
|
||||||
msg_ok "Rebuilt Tube Archivist"
|
msg_ok "Rebuilt Tube Archivist"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bgutil-ytdlp-pot-provider" "Brainicism/bgutil-ytdlp-pot-provider" "tarball"
|
||||||
|
|
||||||
|
msg_info "Rebuilding BgUtil POT Provider"
|
||||||
|
cd /opt/bgutil-ytdlp-pot-provider/server
|
||||||
|
$STD npm ci
|
||||||
|
$STD npx tsc
|
||||||
|
msg_ok "Rebuilt BgUtil POT Provider"
|
||||||
|
|
||||||
msg_info "Restoring Configuration"
|
msg_info "Restoring Configuration"
|
||||||
sed -i 's|^TA_APP_DIR=/opt/tubearchivist$|TA_APP_DIR=/opt/tubearchivist/backend|' /opt/tubearchivist/.env
|
sed -i 's|^TA_APP_DIR=/opt/tubearchivist$|TA_APP_DIR=/opt/tubearchivist/backend|' /opt/tubearchivist/.env
|
||||||
sed -i 's|^TA_CACHE_DIR=/opt/tubearchivist/cache$|TA_CACHE_DIR=/cache|' /opt/tubearchivist/.env
|
sed -i 's|^TA_CACHE_DIR=/opt/tubearchivist/cache$|TA_CACHE_DIR=/cache|' /opt/tubearchivist/.env
|
||||||
@@ -76,7 +111,7 @@ function update_script() {
|
|||||||
msg_ok "Restored Configuration"
|
msg_ok "Restored Configuration"
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
systemctl start tubearchivist tubearchivist-celery tubearchivist-beat
|
systemctl start bgutil-provider tubearchivist tubearchivist-celery tubearchivist-beat
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
msg_ok "Started Services"
|
msg_ok "Started Services"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
|
|||||||
@@ -25,13 +25,26 @@ $STD apt install -y \
|
|||||||
libsasl2-dev \
|
libsasl2-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
ffmpeg
|
ffmpeg \
|
||||||
|
libcairo2-dev \
|
||||||
|
libpango1.0-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libgif-dev \
|
||||||
|
librsvg2-dev \
|
||||||
|
pkg-config
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
UV_PYTHON="3.13" setup_uv
|
UV_PYTHON="3.13" setup_uv
|
||||||
NODE_VERSION="24" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
|
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
|
||||||
|
fetch_and_deploy_gh_release "bgutil-ytdlp-pot-provider" "Brainicism/bgutil-ytdlp-pot-provider" "tarball"
|
||||||
|
|
||||||
|
msg_info "Building BgUtil POT Provider Server"
|
||||||
|
cd /opt/bgutil-ytdlp-pot-provider/server
|
||||||
|
$STD npm ci
|
||||||
|
$STD npx tsc
|
||||||
|
msg_ok "Built BgUtil POT Provider Server"
|
||||||
|
|
||||||
msg_info "Installing ElasticSearch"
|
msg_info "Installing ElasticSearch"
|
||||||
setup_deb822_repo \
|
setup_deb822_repo \
|
||||||
@@ -116,6 +129,10 @@ EOF
|
|||||||
systemctl enable -q --now redis-server
|
systemctl enable -q --now redis-server
|
||||||
msg_ok "Set up Tube Archivist"
|
msg_ok "Set up Tube Archivist"
|
||||||
|
|
||||||
|
msg_info "Installing yt-dlp Nightly"
|
||||||
|
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python -U --prerelease allow "yt-dlp[default]"
|
||||||
|
msg_ok "Installed yt-dlp Nightly"
|
||||||
|
|
||||||
msg_info "Configuring Nginx"
|
msg_info "Configuring Nginx"
|
||||||
sed -i 's/^user www-data;$/user root;/' /etc/nginx/nginx.conf
|
sed -i 's/^user www-data;$/user root;/' /etc/nginx/nginx.conf
|
||||||
cat <<'EOF' >/etc/nginx/sites-available/default
|
cat <<'EOF' >/etc/nginx/sites-available/default
|
||||||
@@ -230,10 +247,26 @@ exec $PYTHON backend_start.py
|
|||||||
RUNEOF
|
RUNEOF
|
||||||
chmod +x /opt/tubearchivist/backend/run.sh
|
chmod +x /opt/tubearchivist/backend/run.sh
|
||||||
ln -sf /opt/tubearchivist/.env /opt/tubearchivist/backend/.env
|
ln -sf /opt/tubearchivist/.env /opt/tubearchivist/backend/.env
|
||||||
|
cat <<EOF >/etc/systemd/system/bgutil-provider.service
|
||||||
|
[Unit]
|
||||||
|
Description=BgUtil YT-DLP POT Provider
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/bgutil-ytdlp-pot-provider/server
|
||||||
|
ExecStart=/usr/bin/node build/main.js
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/tubearchivist.service
|
cat <<EOF >/etc/systemd/system/tubearchivist.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Tube Archivist Backend
|
Description=Tube Archivist Backend
|
||||||
After=network.target elasticsearch.service redis-server.service
|
After=network.target elasticsearch.service redis-server.service bgutil-provider.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
@@ -286,7 +319,7 @@ RuntimeMaxSec=3600
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now tubearchivist tubearchivist-celery tubearchivist-beat
|
systemctl enable -q --now bgutil-provider tubearchivist tubearchivist-celery tubearchivist-beat
|
||||||
msg_ok "Created Services"
|
msg_ok "Created Services"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|||||||
Reference in New Issue
Block a user