|
|
|
@ -15,7 +15,7 @@ export HOMEPAGE_BUILDTIME=$(date +%s)
|
|
|
|
|
# Set privileges for /app but only if pid 1 user is root and we are dropping privileges.
|
|
|
|
|
# If container is run as an unprivileged user, it means owner already handled ownership setup on their own.
|
|
|
|
|
# Running chown in that case (as non-root) will cause error
|
|
|
|
|
[ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ] && chown -R ${PUID}:${PGID} /app
|
|
|
|
|
[ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ] && chown -R ${PUID}:${PGID} /app/config /app/public
|
|
|
|
|
|
|
|
|
|
# Drop privileges (when asked to) if root, otherwise run as current user
|
|
|
|
|
if [ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ]; then
|
|
|
|
|