mirror of
https://github.com/gethomepage/homepage.git
synced 2025-05-23 17:52:35 -04:00
Tweak: try to reduce rootless startup time (#5037)
This commit is contained in:
parent
fa28a11658
commit
aed602ad70
@ -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.
|
# 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.
|
# 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
|
# 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
|
# Drop privileges (when asked to) if root, otherwise run as current user
|
||||||
if [ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ]; then
|
if [ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user