20 lines
533 B
Bash
20 lines
533 B
Bash
#!/usr/bin/env sh
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
|
|
if [ -f /etc/authelia/users.yaml.default ]; then
|
|
touch /etc/authelia/users.yaml
|
|
# shellcheck disable=SC2016
|
|
yq eval-all '. as $item ireduce ({}; . * $item)' /etc/authelia/users.yaml /etc/authelia/users.yaml.default -i
|
|
fi
|
|
|
|
if [ -d /etc/authelia/conf.d ]; then
|
|
# shellcheck disable=SC2016
|
|
yq eval-all '. as $item ireduce ({}; . *+ $item)' /etc/authelia/conf.d/*.yaml > /etc/authelia/configuration.yaml
|
|
fi
|
|
|
|
exec authelia \
|
|
--config /etc/authelia/configuration.yaml \
|
|
"$@"
|