docker-plex-wireguard/root/etc/cont-init.d/40-chown-files

22 lines
559 B
Text
Raw Normal View History

#!/usr/bin/with-contenv bash
2017-01-11 20:29:18 +00:00
# create folders
2017-01-11 20:37:30 +00:00
if [ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" ]; then \
2017-01-11 20:29:18 +00:00
mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
2017-01-11 20:37:30 +00:00
chown -R abc:abc /config
2017-01-11 20:29:18 +00:00
fi
# check Library permissions
PUID=${PUID:-911}
if [ ! "$(stat -c %u /config/Library)" = "$PUID" ]; then
echo "Change in ownership detected, please be patient while we chown existing files"
echo "This could take some time"
chown abc:abc -R \
2017-01-11 20:29:18 +00:00
/config/Library
fi
# permissions (non-recursive) on config root and folders
chown abc:abc \
/config \
/config/*