init-plex-claim/run: do not run s6-setuidgid on non-root containers

Fixes #422
This commit is contained in:
Evan Champion 2026-03-15 12:01:53 +08:00
parent cb3568d81a
commit e64b2579d7
2 changed files with 10 additions and 2 deletions

View File

@ -371,6 +371,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **15.03.26:** - Fix initial claim setup on non-root containers
* **04.11.24:** - Add Nvidia capability needed for h265
* **18.07.24:** - Rebase to Ubuntu Noble.
* **12.02.24:** - Use universal hardware acceleration blurb

View File

@ -19,8 +19,15 @@ if [[ ! -f "${PLEX_MEDIA_SERVER_PREFERENCES}" ]]; then
export PLEX_MEDIA_SERVER_INFO_MODEL
PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION
s6-setuidgid abc /bin/bash -c \
'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server' &
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
s6-setuidgid abc /bin/bash -c \
'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server' &
else
/bin/bash -c \
'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server' &
fi
PID=$!
echo "Waiting for Plex to generate its config"
DBNAME="/config/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal"