Jellyfin: Init
This commit is contained in:
parent
785e0f83c8
commit
3a0eadbe8b
1 changed files with 51 additions and 0 deletions
51
cfg/jobs/jellyfin.run
Executable file
51
cfg/jobs/jellyfin.run
Executable file
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
# Upstream doc: https://adguard-dns.io/kb/adguard-home/getting-started/
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
IMAGE="ubuntu/24.04"
|
||||||
|
DIST="${IMAGE%%/*}"
|
||||||
|
VER="${IMAGE#*/}"
|
||||||
|
VER="${VER%/*}"
|
||||||
|
VER="${VER//./-}"
|
||||||
|
UPSTREAM_VER="10.10.6"
|
||||||
|
UPSTREAM_VER_DASH="${UPSTREAM_VER//./-}"
|
||||||
|
UPSTREAM_NAME="jellyfin"
|
||||||
|
SERIAL="1benoitjpnet"
|
||||||
|
CNAME="$UPSTREAM_NAME-$UPSTREAM_VER_DASH-$SERIAL-$DIST-$VER"
|
||||||
|
ALIAS="$UPSTREAM_NAME-$UPSTREAM_VER-$SERIAL"
|
||||||
|
|
||||||
|
cd "$WORKSPACE"
|
||||||
|
incus launch images:$IMAGE "$CNAME" --quiet
|
||||||
|
|
||||||
|
wait_network "$CNAME"
|
||||||
|
|
||||||
|
incus config set "$CNAME" environment.DEBIAN_FRONTEND=noninteractive
|
||||||
|
incus config set "$CNAME" environment.DEBCONF_NONINTERACTIVE_SEEN=true
|
||||||
|
incus config set "$CNAME" environment.LC_ALL=C
|
||||||
|
|
||||||
|
incus exec "$CNAME" -- apt-get update
|
||||||
|
incus exec "$CNAME" -- apt-get upgrade -y
|
||||||
|
incus exec "$CNAME" -- apt-get install -y --no-install-recommends wget curl gnupg software-properties-common
|
||||||
|
incus exec "$CNAME" -- add-apt-repository universe
|
||||||
|
incus exec "$CNAME" -- mkdir -p /etc/apt/keyrings
|
||||||
|
incus exec "$CNAME" -- bash -c 'curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg'
|
||||||
|
incus exec "$CNAME" -- bash -c 'export DPKG_ARCHITECTURE="$( dpkg --print-architecture )"'
|
||||||
|
incus exec "$CNAME" -- bash -c 'cat <<EOF > /etc/apt/sources.list.d/jellyfin.sources
|
||||||
|
Types: deb
|
||||||
|
URIs: https://repo.jellyfin.org/ubuntu
|
||||||
|
Suites: noble
|
||||||
|
Components: main
|
||||||
|
Architectures: amd64
|
||||||
|
Signed-By: /etc/apt/keyrings/jellyfin.gpg
|
||||||
|
EOF'
|
||||||
|
incus exec "$CNAME" -- apt-get update
|
||||||
|
incus exec "$CNAME" -- apt-get install -y jellyfin=${UPSTREAM_VER}
|
||||||
|
incus exec "$CNAME" -- systemctl enable jellyfin
|
||||||
|
|
||||||
|
laminarc run incus_publish \
|
||||||
|
CNAME="$CNAME" \
|
||||||
|
UPSTREAM_NAME=$UPSTREAM_NAME \
|
||||||
|
UPSTREAM_VER=$UPSTREAM_VER \
|
||||||
|
IMAGE=$IMAGE \
|
||||||
|
SERIAL=$SERIAL \
|
||||||
|
ALIAS=$ALIAS
|
Loading…
Add table
Reference in a new issue