From 716149b8b6b3e93e187a6b1b19d594e2b255eb74 Mon Sep 17 00:00:00 2001 From: Stian Buch Larsen Date: Wed, 16 Sep 2015 21:47:34 +0200 Subject: [PATCH] New implentation of chowning --- init/90_chown_plex_owned_files.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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