From 38bf0ee740d67f7c9fc2ee2efe1b57384044906a Mon Sep 17 00:00:00 2001 From: Jens L Date: Fri, 14 Apr 2023 13:52:11 +0200 Subject: [PATCH] lifecycle: re-add exec to ak wrapper (#5253) Signed-off-by: Jens Langhammer --- lifecycle/ak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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