lifecycle: re-add exec to ak wrapper (#5253)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
520fb2fac1
commit
38bf0ee740
|
@ -15,7 +15,7 @@ function wait_for_db {
|
||||||
function check_if_root {
|
function check_if_root {
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
log "Not running as root, disabling permission fixes"
|
log "Not running as root, disabling permission fixes"
|
||||||
$1
|
exec $1
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
SOCKET="/var/run/docker.sock"
|
SOCKET="/var/run/docker.sock"
|
||||||
|
@ -35,7 +35,7 @@ function check_if_root {
|
||||||
chown -R authentik:authentik /media /certs
|
chown -R authentik:authentik /media /certs
|
||||||
chmod ug+rwx /media
|
chmod ug+rwx /media
|
||||||
chmod ug+rx /certs
|
chmod ug+rx /certs
|
||||||
chpst -u authentik:$GROUP env HOME=/authentik $1
|
exec chpst -u authentik:$GROUP env HOME=/authentik $1
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_mode {
|
function set_mode {
|
||||||
|
@ -57,9 +57,9 @@ if [[ "$1" == "server" ]]; then
|
||||||
python -m manage bootstrap_tasks
|
python -m manage bootstrap_tasks
|
||||||
fi
|
fi
|
||||||
if [[ -x "$(command -v authentik)" ]]; then
|
if [[ -x "$(command -v authentik)" ]]; then
|
||||||
authentik
|
exec authentik
|
||||||
else
|
else
|
||||||
go run -v ./cmd/server/
|
exec go run -v ./cmd/server/
|
||||||
fi
|
fi
|
||||||
elif [[ "$1" == "worker" ]]; then
|
elif [[ "$1" == "worker" ]]; then
|
||||||
wait_for_db
|
wait_for_db
|
||||||
|
|
Reference in a new issue