Files
jellyfin-ha/docker-entrypoint.sh
unkin-agent 2001204e0b
ci/woodpecker/pr/build Pipeline failed
Bake LDAP + SSO auth plugins into the image
Phase-1 SSO/app-passwords for jellyfin needs the ldapauth and sso plugins
present without relying on the in-app catalog (which the plugins-baked PVC
would otherwise let drift). Pin the newest release of each whose targetAbi
is <= the pinned server version (10.11.6) and let the image own the version.

- Add a plugins build stage that downloads, sha256-verifies (matching each
  release's published .sha256), and unpacks the plugin zips into versioned
  dirs baked at /usr/share/jellyfin/plugins-baked.
- LDAP Authentication 22.0.0.0 (targetAbi 10.11.2.0; v23 needs 10.11.9).
- SSO Authentication 4.0.0.4 (targetAbi 10.11.0.0).
- Add docker-entrypoint.sh that syncs baked plugin dirs into /config/plugins
  on every start, removing any stale versioned dir of the same plugin so the
  image controls the version across restarts; preserves plugin configurations.
- Point ENTRYPOINT at the new script.
2026-08-26 22:13:40 +10:00

30 lines
957 B
Bash

#!/bin/sh
# Sync image-baked plugins into the /config (datadir) plugins directory on every
# start. /config is a PVC that overlays the image, so plugins baked into the
# image are invisible until copied in here. Removing any existing versioned dir
# of the same plugin first lets the image version win across restarts/downgrades.
set -eu
BAKED_DIR=/usr/share/jellyfin/plugins-baked
PLUGIN_DIR=/config/plugins
if [ -d "$BAKED_DIR" ]; then
mkdir -p "$PLUGIN_DIR"
for src in "$BAKED_DIR"/*; do
[ -d "$src" ] || continue
name=$(basename "$src") # e.g. "LDAP Authentication_22.0.0.0"
base=${name%_*} # plugin name without the trailing _<version>
for existing in "$PLUGIN_DIR/$base"_*; do
[ -e "$existing" ] && rm -rf "$existing"
done
rm -rf "$PLUGIN_DIR/$name"
cp -a "$src" "$PLUGIN_DIR/$name"
done
fi
exec ./jellyfin \
--datadir /config \
--cachedir /cache \
--webdir /jellyfin/jellyfin-web \
"$@"