Skip to content

Commit c1ab38b

Browse files
authored
Merge pull request #447 from evan314159/nonroot-init-plex-claim
2 parents cb3568d + e64b257 commit c1ab38b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
371371

372372
## Versions
373373

374+
* **15.03.26:** - Fix initial claim setup on non-root containers
374375
* **04.11.24:** - Add Nvidia capability needed for h265
375376
* **18.07.24:** - Rebase to Ubuntu Noble.
376377
* **12.02.24:** - Use universal hardware acceleration blurb

root/etc/s6-overlay/s6-rc.d/init-plex-claim/run

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ if [[ ! -f "${PLEX_MEDIA_SERVER_PREFERENCES}" ]]; then
1919
export PLEX_MEDIA_SERVER_INFO_MODEL
2020
PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
2121
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION
22-
s6-setuidgid abc /bin/bash -c \
23-
'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server' &
22+
23+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
24+
s6-setuidgid abc /bin/bash -c \
25+
'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server' &
26+
else
27+
/bin/bash -c \
28+
'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server' &
29+
fi
30+
2431
PID=$!
2532
echo "Waiting for Plex to generate its config"
2633
DBNAME="/config/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal"

0 commit comments

Comments
 (0)