#!/usr/bin/env bash set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" INFRA_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" cd "${INFRA_DIR}" docker compose --env-file "${CMS_ENV_FILE:-.env}" -f docker-compose.yml exec -T authentik-worker sh -lc \ 'if command -v ak >/dev/null 2>&1; then ak shell < /bootstrap/bootstrap-cms.py; else /lifecycle/ak shell < /bootstrap/bootstrap-cms.py; fi'