Update jellyfin-install.sh

Use the Deb822 format jellyfin.sources
This commit is contained in:
tteckster 2023-04-05 06:41:33 -04:00 committed by GitHub
parent b1451e795e
commit 3e7f070ea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,9 +16,8 @@ update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y curl $STD apt-get install -y curl
$STD apt-get install -y sudo $STD apt-get install -y sudo
$STD apt-get install -y gnupg
$STD apt-get install -y mc $STD apt-get install -y mc
$STD apt-get install -y apt-transport-https
$STD apt-get install -y software-properties-common
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then
@ -37,35 +36,27 @@ if [[ -z "$(grep -w "100000" /proc/self/uid_map)" ]]; then
msg_ok "Set Up Hardware Acceleration" msg_ok "Set Up Hardware Acceleration"
fi fi
msg_info "Setting Up Jellyfin Repository"
$STD add-apt-repository universe -y
$STD apt-key add <(curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key)
sh -c 'echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/ubuntu $(lsb_release -c -s) main" > /etc/apt/sources.list.d/jellyfin.list'
msg_ok "Set Up Jellyfin Repository"
msg_info "Installing Jellyfin" msg_info "Installing Jellyfin"
$STD apt-get update VERSION="$( awk -F'=' '/^UBUNTU_CODENAME=/{ print $NF }' /etc/os-release )"
$STD apt install jellyfin-server -y # If the keyring directory is absent, create it
$STD apt install jellyfin-ffmpeg5 -y if [[ ! -d /etc/apt/keyrings ]]; then
msg_ok "Installed Jellyfin" mkdir -p /etc/apt/keyrings
fi
msg_info "Creating Service" # Download the repository signing key and install it to the keyring directory
cat <<'EOF' >/lib/systemd/system/jellyfin.service curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --yes --output /etc/apt/keyrings/jellyfin.gpg
[Unit] # Install the Deb822 format jellyfin.sources entry
Description = Jellyfin Media Server cat <<EOF >/etc/apt/sources.list.d/jellyfin.sources
After = network.target Types: deb
[Service] URIs: https://repo.jellyfin.org/${PCT_OSTYPE}
Type = simple Suites: ${VERSION}
EnvironmentFile = /etc/default/jellyfin Components: main
User = root Architectures: amd64
ExecStart = /usr/bin/jellyfin Signed-By: /etc/apt/keyrings/jellyfin.gpg
Restart = on-failure
TimeoutSec = 15
[Install]
WantedBy = multi-user.target
EOF EOF
ln -s /usr/share/jellyfin/web/ /usr/lib/jellyfin/bin/jellyfin-web # Install Jellyfin using the metapackage (which will fetch jellyfin-server, jellyfin-web, and jellyfin-ffmpeg5)
msg_ok "Created Service" $STD apt-get update
$STD apt-get install -y jellyfin
msg_ok "Installed Jellyfin"
motd_ssh motd_ssh
root root