File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22
3- # check for Library existence and permissions
4- if [ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" ]; then
5- mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
6- chown abc:abc "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
7- elif [ ! "$(stat -c %u "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}")" = "$PUID" ]; then
3+ # create folders
4+ if [[ ! -d ${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR} ]]; then \
5+ mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
6+ chown -R abc:abc "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
7+ fi
8+
9+ # check Library permissions
10+ PUID=${PUID:-911}
11+ if [ ! "$(stat -c %u /config/Library)" = "$PUID" ]; then
812 echo "Change in ownership detected, please be patient while we chown existing files"
913 echo "This could take some time"
1014 chown abc:abc -R \
11- "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
15+ /config/Library
1216fi
1317
14- chown abc:abc \
15- /config \
16- /config/*
You can’t perform that action at this time.
0 commit comments