#!/usr/bin/env bash set -Eeuo pipefail if [[ -x /usr/local/bin/prole-db-ssh-openbao.sh ]]; then /usr/local/bin/prole-db-ssh-openbao.sh || true fi # If user runs the default "postgres" command, optionally force pg_tde preload. if [[ "${1:-}" == "postgres" ]] && [[ "${ENABLE_PG_TDE:-}" == "1" ]]; then # Only inject if user didn't already set shared_preload_libraries explicitly if ! printf '%q ' "$@" | grep -q "shared_preload_libraries"; then set -- "$@" -c "shared_preload_libraries=pg_tde" fi fi # Delegate everything else to the official entrypoint exec /usr/local/bin/docker-entrypoint.sh "$@"