From 74aa3d254b725975bc29a2eb4ce6c58b084335c9 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Mon, 20 Oct 2025 16:43:20 +0200 Subject: [PATCH] run mariadb and then teleport --- scripts/docker-entrypoint.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 61f15cc..d70617c 100755 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -709,12 +709,11 @@ _main_mariadb() { docker_mariadb_upgrade "$@" fi fi - exec "$@" -} -_check_to_run_teleport() { if [ -f "/etc/teleport.yaml" ]; then - teleport start -c /etc/teleport.yaml & + exec "$@" & + else + exec "$@" fi } @@ -737,8 +736,12 @@ _run_web_server() { # If we are sourced from elsewhere, don't perform any further actions if ! _is_sourced; then - _check_to_run_teleport _run_web_server - _main_mariadb "$@" + if [ -f "/etc/teleport.yaml" ]; then + _main_mariadb "$@" + teleport start -c /etc/teleport.yaml + else + _main_mariadb "$@" + fi fi