lifecycle: re-add exec to ak wrapper (#5253)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-04-14 13:52:11 +02:00 committed by GitHub
parent 520fb2fac1
commit 38bf0ee740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ function wait_for_db {
function check_if_root {
if [[ $EUID -ne 0 ]]; then
log "Not running as root, disabling permission fixes"
$1
exec $1
return
fi
SOCKET="/var/run/docker.sock"
@ -35,7 +35,7 @@ function check_if_root {
chown -R authentik:authentik /media /certs
chmod ug+rwx /media
chmod ug+rx /certs
chpst -u authentik:$GROUP env HOME=/authentik $1
exec chpst -u authentik:$GROUP env HOME=/authentik $1
}
function set_mode {
@ -57,9 +57,9 @@ if [[ "$1" == "server" ]]; then
python -m manage bootstrap_tasks
fi
if [[ -x "$(command -v authentik)" ]]; then
authentik
exec authentik
else
go run -v ./cmd/server/
exec go run -v ./cmd/server/
fi
elif [[ "$1" == "worker" ]]; then
wait_for_db