From 4dc37ac1aa08eceab0666b86e11c48d4a4bc05f8 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 11 Sep 2020 12:34:40 -0700 Subject: [PATCH] do not chown all the time (on update) --- start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 8024448..38a65b0 100755 --- a/start.sh +++ b/start.sh @@ -4,8 +4,10 @@ set -eu mkdir -p /app/data/data /run/minio/config /run/minio/certs +# minio is used for backups at times and has a large number of files. optimize by checking if files +# are actually in correct chown state echo "==> Changing ownership" -chown -R cloudron:cloudron /app/data +[[ $(stat --format '%U' /app/data/data) != "cloudron" ]] && chown -R cloudron:cloudron /app/data # the --config-dir is deprecated and not used. but without it, minio will try to create $HOME/.minio :/ same for --certs-dir echo "==> Starting minio"