Fix: make chown execution optional in docker-entrypoint

This commit is contained in:
Dmitry Dunaev
2021-07-28 10:48:23 +03:00
parent 076741812c
commit fac89e0bc3

View File

@@ -2,7 +2,9 @@
set -e
if [ "$1" = '/ucentral/ucentralsec' -a "$(id -u)" = '0' ]; then
chown -R "$UCENTRALSEC_USER": "$UCENTRALSEC_ROOT" "$UCENTRALSEC_CONFIG"
if [ "$RUN_CHOWN" = 'true' ]; then
chown -R "$UCENTRALSEC_USER": "$UCENTRALSEC_ROOT" "$UCENTRALSEC_CONFIG"
fi
exec su-exec "$UCENTRALSEC_USER" "$@"
fi