- Multi-stage Dockerfile: discover patterns from PMS binary (capstone), compile .so with zig (musl), layer onto lscr.io/linuxserver/plex - Uses LD_PRELOAD instead of patchelf (which corrupts Plex's musl loader) - Auto-discovery: broad structural patterns with string-anchored fallback (//feature) and relationship-based fallback (BITSET_REF within BS_INIT) - hook.cpp uses __has_include for generated patterns with hardcoded fallbacks - Custom wrapper.sh (no traffic_logger preload) - Vendored Freeloader source (github.com/authrequest/Freeloader, AGPL-3.0) - Removed stale plexmediaserver_crack.so binary - Supports Plex 1.43.3+ (verified against 1.43.2 and 1.43.3)
16 lines
674 B
Bash
16 lines
674 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
# In-container launcher for Plex Media Server. Sets LD_PRELOAD only for the
|
|
# final exec so the (musl) PMS process is preloaded without affecting glibc
|
|
# helper children (Tuner, Script Host, transcoders).
|
|
|
|
set -eu
|
|
|
|
export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= '{print $2}' | tr -d '"')"
|
|
export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"
|
|
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release | awk -F= '{print $2}' | tr -d '"')"
|
|
|
|
export LD_PRELOAD="/usr/lib/plexmediaserver/lib/plexmediaserver_crack.so"
|
|
|
|
exec "/usr/lib/plexmediaserver/Plex Media Server" "$@"
|