kolaente
80266d1383
All checks were successful
continuous-integration/drone/push Build is passing
This would try to chown a mounted Vikunja config file as well which failed when that config file was mounted read-only.
16 lines
445 B
Bash
16 lines
445 B
Bash
#!/usr/bin/env sh
|
|
set -e
|
|
|
|
if [ -n "$PUID" ] && [ "$PUID" -ne 0 ] && \
|
|
[ -n "$PGID" ] && [ "$PGID" -ne 0 ] ; then
|
|
echo "info: creating the new user vikunja with $PUID:$PGID"
|
|
groupmod -g "$PGID" -o vikunja
|
|
usermod -u "$PUID" -o vikunja
|
|
chown -R vikunja:vikunja ./files/
|
|
chown vikunja:vikunja .
|
|
exec su vikunja -c /app/vikunja/vikunja "$@"
|
|
else
|
|
echo "info: creation of non-root user is skipped"
|
|
exec /app/vikunja/vikunja "$@"
|
|
fi
|