set permissions on Plex Transcoder Temp Directory

Signed-off-by: Eric Nemchik <eric@nemchik.com>
pull/387/head
Eric Nemchik 11 months ago
parent b046c3ffb4
commit b9fdee8cb8
No known key found for this signature in database

@ -20,6 +20,18 @@ if [[ -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
fi fi
# set permissions on Plex Transcoder Temp Directory
PREFNAME="/config/Library/Application Support/Plex Media Server/Preferences.xml"
if [[ -f "${PREFNAME}" ]]; then
TranscoderTempDirectory='\bTranscoderTempDirectory="([^"]+)"'
while IFS= read -r line; do
if [[ ${line} =~ ${TranscoderTempDirectory} ]] && [[ -d "${BASH_REMATCH[1]}" ]]; then
echo "Setting permissions on ${BASH_REMATCH[1]}"
lsiown -R abc:abc "${BASH_REMATCH[1]}"
fi
done <"${PREFNAME}"
fi
# permissions (non-recursive) on config root and folders # permissions (non-recursive) on config root and folders
lsiown abc:abc \ lsiown abc:abc \
/config \ /config \

Loading…
Cancel
Save