Fix UID/GID envvar names in start_pms

This commit is contained in:
Joe Groocock 2017-12-15 16:51:41 +00:00
parent 2b35049cc0
commit aaff69a085
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -11,7 +11,7 @@ export PLEX_MEDIA_SERVER_CONFIG_DIR="${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR
if [ ! -d "$PLEX_MEDIA_SERVER_CONFIG_DIR" ] if [ ! -d "$PLEX_MEDIA_SERVER_CONFIG_DIR" ]
then then
mkdir -p "$PLEX_MEDIA_SERVER_CONFIG_DIR" && \ mkdir -p "$PLEX_MEDIA_SERVER_CONFIG_DIR" && \
chown $UID:$GID "$PLEX_MEDIA_SERVER_CONFIG_DIR" chown $SUID:$SGID "$PLEX_MEDIA_SERVER_CONFIG_DIR"
if [ ! $? -eq 0 ] if [ ! $? -eq 0 ]
then then
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_CONFIG_DIR, MAKE SURE I HAVE PERMISSON TO DO THAT!" echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_CONFIG_DIR, MAKE SURE I HAVE PERMISSON TO DO THAT!"
@ -34,7 +34,7 @@ export LD_LIBRARY_PATH="${PLEX_MEDIA_SERVER_HOME}:$LD_LIBRARY_PATH"
export TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}" export TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}"
# Allow Plex group to write to tmpdir # Allow Plex group to write to tmpdir
chgrp $GID "$TMPDIR" chgrp $SGID "$TMPDIR"
chmod g+rwx "$TMPDIR" chmod g+rwx "$TMPDIR"
PIDFILE="${PLEX_MEDIA_SERVER_CONFIG_DIR}/plexmediaserver.pid" PIDFILE="${PLEX_MEDIA_SERVER_CONFIG_DIR}/plexmediaserver.pid"