mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-27 03:03:38 +09:00
reducing sample size to 5 for chown logic as it is not recursive
This commit is contained in:
@@ -39,10 +39,10 @@ done
|
|||||||
# set queue driver to database
|
# set queue driver to database
|
||||||
sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env
|
sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env
|
||||||
|
|
||||||
# function to randomly sample 50 files for their owner and only chown if not abc
|
# function to randomly sample 5 files for their owner and only chown if not abc
|
||||||
chowner () {
|
chowner () {
|
||||||
files=(${1}/*)
|
files=(${1}/*)
|
||||||
for i in {1..50}; do
|
for i in {1..5}; do
|
||||||
user=$(stat -c '%U' $(printf "%s\n" "${files[RANDOM % ${#files[@]}]}"))
|
user=$(stat -c '%U' $(printf "%s\n" "${files[RANDOM % ${#files[@]}]}"))
|
||||||
if [ "${user}" != "abc" ]; then
|
if [ "${user}" != "abc" ]; then
|
||||||
chown -R abc:abc ${1}
|
chown -R abc:abc ${1}
|
||||||
|
|||||||
Reference in New Issue
Block a user