fix: Poll Teleport readyz instead of fixed 10 second sleep. (#18461)

Signed-off-by: Chris Thach <git.identify957@passfwd.com>
This commit is contained in:
Chris Thach authored and GitHub committed 2026-11-04 23:58:49 +01:00
1 parent cfa250a795
commit 1f03150b77
1 file changed
+5 -1
+5 -1
View File
@@ -24,7 +24,11 @@ msg_info "Configuring Teleport"
$STD apt install -y teleport
$STD teleport configure -o /etc/teleport.yaml
systemctl enable -q --now teleport
sleep 10
SECONDS=0
until teleport debug readyz &>/dev/null; do
sleep 2
((SECONDS >= 120)) && { msg_error "Teleport did not become ready in time"; exit 1; }
done
tctl users add teleport-admin --roles=editor,access --logins=root >~/teleportadmin.txt
sed -i "s|https://[^:]*:3080|https://${LOCAL_IP}:3080|g" ~/teleportadmin.txt
msg_ok "Configured Teleport"