Condense the ownership check

pull/79/head
aptalca 8 years ago committed by GitHub
parent ac7bb65f5f
commit 8c4bcb733a

@ -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…
Cancel
Save