From 9cdce51d43c19379c1d8fc4a2e4ec79ee57522b6 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 20 Oct 2026 09:31:07 +0200 Subject: [PATCH] Zitadel: run init and setup in the foreground (#18016) 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 39a231727..1888cbfe1 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"