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"