do not chown all the time (on update)

This commit is contained in:
Girish Ramakrishnan 2020-09-11 12:34:40 -07:00
parent fbeaf26fec
commit 4dc37ac1aa
1 changed files with 3 additions and 1 deletions

View File

@ -4,8 +4,10 @@ set -eu
mkdir -p /app/data/data /run/minio/config /run/minio/certs 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" 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 # 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" echo "==> Starting minio"