mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-18 18:38:07 +00:00
Substitute default values only once
This commit is contained in:
parent
9eaa4ab846
commit
7f78cc8d0f
1 changed files with 5 additions and 3 deletions
|
@ -1,13 +1,15 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
PUID=${PUID=1000}
|
||||||
|
PGID=${PGID=1000}
|
||||||
|
|
||||||
files_ownership () {
|
files_ownership () {
|
||||||
chown -hRc "${PUID=1000}":"${PGID=1000}" /app/data
|
chown -hRc "$PUID":"$PGID" /app/data
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "==> Performing startup jobs and maintenance tasks"
|
echo "==> Performing startup jobs and maintenance tasks"
|
||||||
files_ownership
|
files_ownership
|
||||||
|
|
||||||
echo "==> Starting application with user ${PUID=1000} group ${PGID=1000}"
|
echo "==> Starting application with user $PUID group $PGID"
|
||||||
exec setpriv --reuid "${PUID=1000}" --regid "${PGID=1000}" --clear-groups "$@"
|
exec setpriv --reuid "$PUID" --regid "$PGID" --clear-groups "$@"
|
||||||
|
|
Loading…
Reference in a new issue