Revert "Revert "rebase plex to jammy, update to s6v3, remove opencl drivers""

This commit is contained in:
Eric Nemchik 2022-10-19 10:17:56 -05:00 committed by GitHub
parent 68208c6464
commit c1cded9030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 32 additions and 23 deletions

View file

@ -16,8 +16,9 @@ if [ ! "$(stat -c %u /config/Library)" = "$PUID" ]; then
fi
# remove plex pid after unclean stop
[[ -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" ]] && \
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
if [[ -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" ]]; then
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
fi
# permissions (non-recursive) on config root and folders
chown abc:abc \

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-plex-chown/run

View file

@ -1,6 +1,10 @@
#!/usr/bin/with-contenv bash
if grep -qs "PlexOnlineToken" "/config/Library/Application Support/Plex Media Server/Preferences.xml" || [ -z "$PLEX_CLAIM" ]; then
if grep -qs "PlexOnlineToken" "/config/Library/Application Support/Plex Media Server/Preferences.xml"; then
echo "**** Server already claimed ****"
exit 0
elif [ -z "$PLEX_CLAIM" ]; then
echo "**** Server is unclaimed, but no claim token has been set ****"
exit 0
fi
PREFNAME="/config/Library/Application Support/Plex Media Server/Preferences.xml"
@ -76,4 +80,4 @@ if [ -n "$PlexOnlineToken" ]; then
sed -i "s/\/>/ PlexOnlineToken=\"${PlexOnlineToken}\"\/>/g" "${PREFNAME}"
else
echo "Unable to claim Plex server. Either manually claim by connecting to http://serverip:32400/web from the same network subnet, or recreate container with a new claim token."
fi
fi

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-plex-claim/run

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-plex-gid-video/run

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-plex-update/run

View file

@ -0,0 +1 @@
3

View file

@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bash
echo "Starting Plex Media Server. . . (you can ignore the libusb_init error)"
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 32400" \
s6-setuidgid abc "/usr/lib/plexmediaserver/Plex Media Server"

View file

@ -0,0 +1 @@
longrun

View file

@ -1,8 +0,0 @@
#!/usr/bin/with-contenv bash
echo "Starting Plex Media Server."
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
exec \
s6-setuidgid abc \
/usr/lib/plexmediaserver/Plex\ Media\ Server