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