2023-03-22 20:48:20 -04:00
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
2026-03-18 11:55:38 +01:00
|
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
|
|
|
|
|
# Author: MickLesk (CanbiZ)
|
2025-03-04 17:54:20 +01:00
|
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
|
|
|
|
# Source: https://jellyfin.org/
|
2023-03-22 20:48:20 -04:00
|
|
|
|
|
2025-03-24 14:20:56 +01:00
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
2023-03-22 20:48:20 -04:00
|
|
|
|
color
|
|
|
|
|
|
verb_ip6
|
|
|
|
|
|
catch_errors
|
|
|
|
|
|
setting_up_container
|
|
|
|
|
|
network_check
|
|
|
|
|
|
update_os
|
|
|
|
|
|
|
2026-01-27 23:40:47 +02:00
|
|
|
|
msg_custom "ℹ️" "${GN}" "If NVIDIA GPU passthrough is detected, you'll be asked whether to install drivers in the container"
|
2023-03-22 20:48:20 -04:00
|
|
|
|
|
2026-03-18 11:55:38 +01:00
|
|
|
|
msg_info "Installing Dependencies"
|
|
|
|
|
|
ensure_dependencies libjemalloc2
|
2025-10-20 08:28:22 +02:00
|
|
|
|
if [[ ! -f /usr/lib/libjemalloc.so ]]; then
|
2026-06-21 02:56:49 +10:00
|
|
|
|
ln -sf "/usr/lib/$(arch_resolve "x86_64-linux-gnu" "aarch64-linux-gnu")/libjemalloc.so.2" /usr/lib/libjemalloc.so
|
2025-10-20 08:28:22 +02:00
|
|
|
|
fi
|
2026-03-18 11:55:38 +01:00
|
|
|
|
msg_ok "Installed Dependencies"
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Setting up Jellyfin Repository"
|
2026-09-01 07:45:58 +02:00
|
|
|
|
JELLYFIN_REPO_URL="https://repo.jellyfin.org/$(get_os_info id)"
|
|
|
|
|
|
JELLYFIN_SUITE="$(get_fallback_suite "$(get_os_info id)" "$(get_os_info codename)" "$JELLYFIN_REPO_URL")"
|
2026-03-18 11:55:38 +01:00
|
|
|
|
setup_deb822_repo \
|
|
|
|
|
|
"jellyfin" \
|
|
|
|
|
|
"https://repo.jellyfin.org/jellyfin_team.gpg.key" \
|
2026-09-01 07:45:58 +02:00
|
|
|
|
"$JELLYFIN_REPO_URL" \
|
|
|
|
|
|
"$JELLYFIN_SUITE"
|
2026-03-18 11:55:38 +01:00
|
|
|
|
msg_ok "Set up Jellyfin Repository"
|
2025-10-20 08:28:22 +02:00
|
|
|
|
|
2026-03-18 11:55:38 +01:00
|
|
|
|
msg_info "Installing Jellyfin"
|
2026-09-08 10:28:42 +02:00
|
|
|
|
ensure_dependencies jellyfin jellyfin-ffmpeg8
|
2026-03-18 11:55:38 +01:00
|
|
|
|
ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
|
|
|
|
|
|
ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
|
|
|
|
|
|
msg_ok "Installed Jellyfin"
|
|
|
|
|
|
|
2026-03-19 06:55:56 +01:00
|
|
|
|
setup_hwaccel "jellyfin"
|
|
|
|
|
|
|
2026-03-18 11:55:38 +01:00
|
|
|
|
msg_info "Configuring Jellyfin"
|
2026-01-29 13:40:32 +01:00
|
|
|
|
# Configure log rotation to prevent disk fill (keeps fail2ban compatibility) (PR: #1690 / Issue: #11224)
|
|
|
|
|
|
cat <<EOF >/etc/logrotate.d/jellyfin
|
|
|
|
|
|
/var/log/jellyfin/*.log {
|
|
|
|
|
|
daily
|
|
|
|
|
|
rotate 3
|
|
|
|
|
|
maxsize 100M
|
|
|
|
|
|
missingok
|
|
|
|
|
|
notifempty
|
|
|
|
|
|
compress
|
|
|
|
|
|
delaycompress
|
|
|
|
|
|
copytruncate
|
|
|
|
|
|
}
|
|
|
|
|
|
EOF
|
2024-08-28 11:28:46 -04:00
|
|
|
|
chown -R jellyfin:adm /etc/jellyfin
|
2024-08-28 11:42:30 -04:00
|
|
|
|
sleep 10
|
2024-08-28 11:35:08 -04:00
|
|
|
|
systemctl restart jellyfin
|
2026-03-18 11:55:38 +01:00
|
|
|
|
msg_ok "Configured Jellyfin"
|
2023-03-22 20:48:20 -04:00
|
|
|
|
|
|
|
|
|
|
motd_ssh
|
2023-05-15 07:39:30 -04:00
|
|
|
|
customize
|
2025-11-12 10:56:18 +01:00
|
|
|
|
cleanup_lxc
|