Files
ProxmoxVE/install/jellyfin-install.sh
T

65 lines
1.8 KiB
Bash
Raw Normal View History

2023-03-22 20:48:20 -04:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://jellyfin.org/
2023-03-22 20:48:20 -04: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
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
msg_info "Installing Dependencies"
ensure_dependencies libjemalloc2
if [[ ! -f /usr/lib/libjemalloc.so ]]; then
ln -sf "/usr/lib/$(arch_resolve "x86_64-linux-gnu" "aarch64-linux-gnu")/libjemalloc.so.2" /usr/lib/libjemalloc.so
fi
msg_ok "Installed Dependencies"
msg_info "Setting up Jellyfin Repository"
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")"
setup_deb822_repo \
"jellyfin" \
"https://repo.jellyfin.org/jellyfin_team.gpg.key" \
"$JELLYFIN_REPO_URL" \
"$JELLYFIN_SUITE"
msg_ok "Set up Jellyfin Repository"
msg_info "Installing Jellyfin"
ensure_dependencies jellyfin jellyfin-ffmpeg8
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
/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
msg_ok "Configured Jellyfin"
2023-03-22 20:48:20 -04:00
motd_ssh
2023-05-15 07:39:30 -04:00
customize
cleanup_lxc