Skip to content

Commit 852e557

Browse files
Refactor: Jellyfin repo, ffmpeg package and symlinks (#13045)
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
1 parent c5caca9 commit 852e557

File tree

2 files changed

+33
-30
lines changed

2 files changed

+33
-30
lines changed

ct/jellyfin.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,23 @@ function update_script() {
3939
msg_ok "Updated Intel Dependencies"
4040
fi
4141

42+
msg_info "Setting up Jellyfin Repository"
43+
setup_deb822_repo \
44+
"jellyfin" \
45+
"https://repo.jellyfin.org/jellyfin_team.gpg.key" \
46+
"https://repo.jellyfin.org/$(get_os_info id)" \
47+
"$(get_os_info codename)"
48+
msg_ok "Set up Jellyfin Repository"
49+
4250
msg_info "Updating Jellyfin"
4351
ensure_dependencies libjemalloc2
4452
if [[ ! -f /usr/lib/libjemalloc.so ]]; then
4553
ln -sf /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so
4654
fi
47-
$STD apt update
4855
$STD apt -y upgrade
49-
$STD apt -y --with-new-pkgs upgrade jellyfin jellyfin-server
56+
$STD apt -y --with-new-pkgs upgrade jellyfin jellyfin-server jellyfin-ffmpeg7
57+
ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
58+
ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
5059
msg_ok "Updated Jellyfin"
5160
msg_ok "Updated successfully!"
5261
exit

install/jellyfin-install.sh

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
1414
update_os
1515

1616
msg_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
2421
if [[ ! -f /usr/lib/libjemalloc.so ]]; then
2522
ln -sf /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so
2623
fi
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)
4342
cat <<EOF >/etc/logrotate.d/jellyfin
4443
/var/log/jellyfin/*.log {
@@ -55,12 +54,7 @@ EOF
5554
chown -R jellyfin:adm /etc/jellyfin
5655
sleep 10
5756
systemctl 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

6559
motd_ssh
6660
customize

0 commit comments

Comments
 (0)