Condense the ownership check
This commit is contained in:
parent
ac7bb65f5f
commit
8c4bcb733a
1 changed files with 4 additions and 8 deletions
|
|
@ -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 \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue