From 038882456a053978ad5a0f92d3c23b30d05fd558 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Mon, 19 Oct 2026 19:33:48 +0200 Subject: [PATCH] Zitadel: run init and setup in the foreground start-from-init ran in the background with its output thrown away, and the PID to kill was guessed from lsof after 60 seconds; when the process had already ended, kill got no PID and failed with exit 2. init and setup finish on their own, report their errors, and the service only starts once its user exists. --- install/zitadel-install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/install/zitadel-install.sh b/install/zitadel-install.sh index 39a2317274f..1888cbfe160 100644 --- a/install/zitadel-install.sh +++ b/install/zitadel-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Dependencies (Patience)" -$STD apt install -y ca-certificates lsof +$STD apt install -y ca-certificates msg_ok "Installed Dependecies" PG_VERSION="17" setup_postgresql @@ -114,13 +114,12 @@ NoNewPrivileges=true [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now zitadel +systemctl enable -q zitadel msg_ok "Created Services" msg_info "Zitadel initial setup" -zitadel start-from-init --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml &>/dev/null & -sleep 60 -kill $(lsof -i | awk '/zitadel/ {print $2}' | head -n1) +$STD zitadel init --config /opt/zitadel/config.yaml +$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml useradd zitadel msg_ok "Zitadel initialized"