Merge pull request #8 from chasebolt/chown-onetime
adding lockfile so it is only a onetime event and improving chown avg…pull/9/head
commit
b6da152e33
@ -1,13 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
if [ ! -d "/config/Library" ]; then
|
||||
mkdir /config/Library
|
||||
chown abc:abc /config/Library
|
||||
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
|
||||
if [ ! -f "/config/Library/linuxserver-chown.lock" ]; then
|
||||
find /config/Library ! \( -user abc -a -group root \) -print0 | xargs -0 chown abc:root
|
||||
touch /config/Library/linuxserver-chown.lock
|
||||
fi
|
||||
|
Loading…
Reference in new issue