summaryrefslogtreecommitdiff
path: root/entrypoint.sh
blob: 6927aad5b3469905923fa1f9bd11cc6e8729e655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

[[ ! -z ${UMASK} ]] && umask ${UMASK}

if [[ ! -z ${1} ]] && [[ ${1} != "--config" ]]; then
  exec "$@"
elif [[ $(id -u) != 0 ]] || [[ $(id -g) != 0 ]]; then
  exec authelia "$@"
else
  chown -R ${PUID}:${PGID} /config
  exec su-exec ${PUID}:${PGID} authelia "$@"
fi