diff --git a/lifecycle/ak b/lifecycle/ak index 10f72b421..ce20c8749 100755 --- a/lifecycle/ak +++ b/lifecycle/ak @@ -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