mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-19 16:33:01 +01:00
core: reorder hwaccel setup and adjust GPU group usermod (#13072)
* fix(tdarr): use curl_with_retry and verify binaries before enabling service Tdarr_Updater downloads the actual server/node binaries from tdarr.io at runtime. If tdarr.io is blocked by local DNS (e.g. OPNsense OISD blocklists), the updater exits silently with code 0, leaving no binaries on disk. The subsequent systemctl enable then fails with 'Operation not permitted' (exit 1) because the ExecStart paths don't exist. Changes: - Replace bare curl with curl_with_retry for versions.json and Tdarr_Updater.zip downloads to gain retry logic, DNS pre-check and exponential backoff - Add msg_info before Tdarr_Updater run so users see this step in the log - Check that Tdarr_Server and Tdarr_Node binaries exist after the updater runs; fail immediately with a clear message pointing to tdarr.io connectivity instead of letting systemctl fail with a confusing 'Operation not permitted' Fixes: #13030 * Improve Tdarr installer error handling Refine post-update validation and failure behavior in tdarr-install.sh: remove a redundant status message, simplify the updater check to only require the Tdarr_Server binary, and replace the previous fatal path with msg_error plus an explicit exit 250. This makes failures (for example when tdarr.io is blocked by local DNS) clearer and avoids false negatives from the Tdarr_Node existence check. * Use curl_with_retry and handle updater failure Replace direct curl calls with curl_with_retry for fetching versions.json and downloading Tdarr_Updater.zip to improve network reliability. Add a post-update check that verifies /opt/tdarr/Tdarr_Server/Tdarr_Server exists; if missing, log an error suggesting possible DNS blocking and exit with code 250. Minor cleanup of updater artifacts remains unchanged. * Reorder hwaccel setup and adjust GPU group usermod Move setup_hwaccel invocations in emby, jellyfin, ollama, and plex installers to occur after package installation/configuration so GPU drivers/repos are present before enabling hardware acceleration. Update _setup_gpu_permissions to call usermod directly (remove $STD wrapper) when adding service users to render/video groups. Includes minor whitespace/ordering cleanups in the installer scripts.
This commit is contained in:
committed by
GitHub
parent
607eff0939
commit
ba01175bc6
@@ -13,10 +13,10 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
setup_hwaccel "emby"
|
||||
|
||||
fetch_and_deploy_gh_release "emby" "MediaBrowser/Emby.Releases" "binary"
|
||||
|
||||
setup_hwaccel "emby"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
|
||||
@@ -14,7 +14,6 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_custom "ℹ️" "${GN}" "If NVIDIA GPU passthrough is detected, you'll be asked whether to install drivers in the container"
|
||||
setup_hwaccel "jellyfin"
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
ensure_dependencies libjemalloc2
|
||||
@@ -37,6 +36,8 @@ ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
|
||||
ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
|
||||
msg_ok "Installed Jellyfin"
|
||||
|
||||
setup_hwaccel "jellyfin"
|
||||
|
||||
msg_info "Configuring Jellyfin"
|
||||
# Configure log rotation to prevent disk fill (keeps fail2ban compatibility) (PR: #1690 / Issue: #11224)
|
||||
cat <<EOF >/etc/logrotate.d/jellyfin
|
||||
|
||||
@@ -42,8 +42,6 @@ EOF
|
||||
$STD apt update
|
||||
msg_ok "Set up Intel® Repositories"
|
||||
|
||||
setup_hwaccel "ollama"
|
||||
|
||||
msg_info "Installing Intel® Level Zero"
|
||||
# Debian 13+ has newer Level Zero packages in system repos that conflict with Intel repo packages
|
||||
if is_debian && [[ "$(get_os_version_major)" -ge 13 ]]; then
|
||||
@@ -92,6 +90,8 @@ fi
|
||||
$STD usermod -aG ollama $(id -u -n)
|
||||
msg_ok "Created ollama User and adjusted Groups"
|
||||
|
||||
setup_hwaccel "ollama"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/ollama.service
|
||||
[Unit]
|
||||
|
||||
@@ -13,8 +13,6 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
setup_hwaccel "plex"
|
||||
|
||||
msg_info "Setting Up Plex Media Server Repository"
|
||||
setup_deb822_repo \
|
||||
"plexmediaserver" \
|
||||
@@ -28,6 +26,8 @@ msg_info "Installing Plex Media Server"
|
||||
$STD apt install -y plexmediaserver
|
||||
msg_ok "Installed Plex Media Server"
|
||||
|
||||
setup_hwaccel "plex"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
|
||||
@@ -5213,8 +5213,8 @@ _setup_gpu_permissions() {
|
||||
|
||||
# Add service user to render and video groups for GPU hardware acceleration
|
||||
if [[ -n "$service_user" ]]; then
|
||||
$STD usermod -aG render "$service_user" 2>/dev/null || true
|
||||
$STD usermod -aG video "$service_user" 2>/dev/null || true
|
||||
usermod -aG render "$service_user" 2>/dev/null || true
|
||||
usermod -aG video "$service_user" 2>/dev/null || true
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user