Fix directory permission issue on new installations
This commit is contained in:
parent
4ebce5f2a8
commit
bfaa4e9de1
@ -8,13 +8,13 @@ export PLEX_MEDIA_SERVER_TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR:-/tmp}"
|
||||
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR:-/config}"
|
||||
export PLEX_MEDIA_SERVER_CONFIG_DIR="${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}/Plex Media Server"
|
||||
|
||||
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" ]
|
||||
if [ ! -d "$PLEX_MEDIA_SERVER_CONFIG_DIR" ]
|
||||
then
|
||||
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" && \
|
||||
chown $UID:$GID "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
|
||||
mkdir -p "$PLEX_MEDIA_SERVER_CONFIG_DIR" && \
|
||||
chown $UID:$GID "$PLEX_MEDIA_SERVER_CONFIG_DIR"
|
||||
if [ ! $? -eq 0 ]
|
||||
then
|
||||
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_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!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user