diff --git a/init/90_chown_plex_owned_files.sh b/init/90_chown_plex_owned_files.sh index f7d37fc..7705a2f 100644 --- a/init/90_chown_plex_owned_files.sh +++ b/init/90_chown_plex_owned_files.sh @@ -1,10 +1,13 @@ #!/bin/bash -if [ -d "/config/Library" ]; then -find /config/Library ! \( -user abc -a -group abc \) -exec chown -hv abc:abc {} + -else +if [ ! -d "/config/Library" ]; then mkdir /config/Library chown abc:abc /config/Library fi + + +if [ ! -f "/config/Library/chown.log" ]; then + chown -Rc abc:root /config/Library >> /config/Library/chown.log +fi \ No newline at end of file