|
|
@ -1,14 +1,10 @@
|
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
|
|
|
|
|
|
|
|
# check for preferences file and if not found, exit out
|
|
|
|
# check for Library existence and permissions
|
|
|
|
if [ ! -e "/config/Library/Application Support/Plex Media Server/Preferences.xml" ]; then
|
|
|
|
if [ ! -d "/config/Library" ]; then
|
|
|
|
mkdir -p /config/Library
|
|
|
|
mkdir -p /config/Library
|
|
|
|
chown abc:abc \
|
|
|
|
chown abc:abc /config/Library
|
|
|
|
/config/Library
|
|
|
|
elif [ ! "$(stat -c %u /config/Library)" = "$PUID" ]; then
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! "$(stat -c %u /config/Library)" = "$PUID" ]; then
|
|
|
|
|
|
|
|
echo "Change in ownership detected, please be patient while we chown existing files"
|
|
|
|
echo "Change in ownership detected, please be patient while we chown existing files"
|
|
|
|
echo "This could take some time"
|
|
|
|
echo "This could take some time"
|
|
|
|
chown abc:abc -R \
|
|
|
|
chown abc:abc -R \
|
|
|
|