mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 14:44:32 +00:00
13 lines
503 B
Bash
13 lines
503 B
Bash
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
|
|
# 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 "$@" |