11#! /usr/bin/env bash
22
3- # Copyright (c) 2021-2026 tteck
4- # Author: tteck (tteckster )
3+ # Copyright (c) 2021-2026 community-scripts ORG
4+ # Author: MickLesk (CanbiZ )
55# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66# Source: https://jellyfin.org/
77
@@ -14,31 +14,30 @@ network_check
1414update_os
1515
1616msg_custom " ℹ️" " ${GN} " " If NVIDIA GPU passthrough is detected, you'll be asked whether to install drivers in the container"
17- setup_hwaccel
17+ setup_hwaccel " jellyfin "
1818
19- msg_info " Installing Jellyfin"
20- VERSION=" $( awk -F' =' ' /^VERSION_CODENAME=/{ print $NF }' /etc/os-release) "
21- if ! dpkg -s libjemalloc2 > /dev/null 2>&1 ; then
22- $STD apt install -y libjemalloc2
23- fi
19+ msg_info " Installing Dependencies"
20+ ensure_dependencies libjemalloc2
2421if [[ ! -f /usr/lib/libjemalloc.so ]]; then
2522 ln -sf /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so
2623fi
27- if [[ ! -d /etc/apt/keyrings ]]; then
28- mkdir -p /etc/apt/keyrings
29- fi
30- curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --yes --output /etc/apt/keyrings/jellyfin.gpg
31- cat << EOF >/etc/apt/sources.list.d/jellyfin.sources
32- Types: deb
33- URIs: https://repo.jellyfin.org/${PCT_OSTYPE}
34- Suites: ${VERSION}
35- Components: main
36- Architectures: amd64
37- Signed-By: /etc/apt/keyrings/jellyfin.gpg
38- EOF
24+ msg_ok " Installed Dependencies"
25+
26+ msg_info " Setting up Jellyfin Repository"
27+ setup_deb822_repo \
28+ " jellyfin" \
29+ " https://repo.jellyfin.org/jellyfin_team.gpg.key" \
30+ " https://repo.jellyfin.org/$( get_os_info id) " \
31+ " $( get_os_info codename) "
32+ msg_ok " Set up Jellyfin Repository"
3933
40- $STD apt update
41- $STD apt install -y jellyfin
34+ msg_info " Installing Jellyfin"
35+ $STD apt install -y jellyfin jellyfin-ffmpeg7
36+ ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
37+ ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
38+ msg_ok " Installed Jellyfin"
39+
40+ msg_info " Configuring Jellyfin"
4241# Configure log rotation to prevent disk fill (keeps fail2ban compatibility) (PR: #1690 / Issue: #11224)
4342cat << EOF >/etc/logrotate.d/jellyfin
4443/var/log/jellyfin/*.log {
5554chown -R jellyfin:adm /etc/jellyfin
5655sleep 10
5756systemctl restart jellyfin
58- if [[ " $CTTYPE " == " 0" ]]; then
59- sed -i -e ' s/^ssl-cert:x:104:$/render:x:104:root,jellyfin/' -e ' s/^render:x:108:root,jellyfin$/ssl-cert:x:108:/' /etc/group
60- else
61- sed -i -e ' s/^ssl-cert:x:104:$/render:x:104:jellyfin/' -e ' s/^render:x:108:jellyfin$/ssl-cert:x:108:/' /etc/group
62- fi
63- msg_ok " Installed Jellyfin"
57+ msg_ok " Configured Jellyfin"
6458
6559motd_ssh
6660customize
0 commit comments