mirror of
https://gh.con.sh/https://github.com/plexinc/pms-docker
synced 2025-04-18 07:44:55 +00:00
Change chown to modify ownership symlinks
It is possible to end up with a long startup period if symlinks have incorrect ownership as they've never corrected by this script currently so each new docker pull they are found by find and the target ownership is updated (despite being correct) causing a delay in startup This change assumes that all symlink targets are also within the /config directory tree otherwise the targets could be left unchanged as chown no longer follows the links. Alternatively we could run the command twice once for targets & once for symlinks themselves.
This commit is contained in:
parent
61178f762e
commit
220d9f72fd
|
@ -67,10 +67,10 @@ fi
|
|||
if [ "${CHANGE_CONFIG_DIR_OWNERSHIP,,}" = "true" ]; then
|
||||
if [ -f "${prefFile}" ]; then
|
||||
if [ ! "$(stat -c %u "${prefFile}")" = "$(id -u plex)" ]; then
|
||||
find /config \! \( -uid $(id -u plex) -gid $(id -g plex) \) -print0 | xargs -0 chown plex:plex
|
||||
find /config \! \( -uid $(id -u plex) -gid $(id -g plex) \) -print0 | xargs -0 chown -h plex:plex
|
||||
fi
|
||||
else
|
||||
find /config \! \( -uid $(id -u plex) -gid $(id -g plex) \) -print0 | xargs -0 chown plex:plex
|
||||
find /config \! \( -uid $(id -u plex) -gid $(id -g plex) \) -print0 | xargs -0 chown -h plex:plex
|
||||
fi
|
||||
chown -R plex:plex /transcode
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user