diff --git a/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh b/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh index f49f312a0cdbe..5235f9c2d282f 100644 --- a/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh +++ b/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh @@ -485,11 +485,7 @@ repmgr_postgresql_configuration() { else repmgr_inject_postgresql_configuration fi - if repmgr_is_file_external "pg_hba.conf"; then - cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" - else - repmgr_inject_pghba_configuration - fi + repmgr_inject_pghba_configuration if [[ "$REPMGR_USE_PASSFILE" = "true" ]] && [[ ! -f "${REPMGR_PASSFILE_PATH}" ]]; then echo "*:*:*:${REPMGR_USERNAME}:${REPMGR_PASSWORD}" >"${REPMGR_PASSFILE_PATH}" chmod 600 "${REPMGR_PASSFILE_PATH}" @@ -864,6 +860,9 @@ repmgr_initialize() { fi if ! repmgr_is_file_external "pg_hba.conf"; then is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba + else + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_CONF_DIR}/pg_hba.conf" fi if [[ "$REPMGR_ROLE" = "primary" ]]; then if is_boolean_yes "$POSTGRESQL_FIRST_BOOT"; then diff --git a/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh b/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh index f49f312a0cdbe..5235f9c2d282f 100644 --- a/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh +++ b/bitnami/postgresql-repmgr/13/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh @@ -485,11 +485,7 @@ repmgr_postgresql_configuration() { else repmgr_inject_postgresql_configuration fi - if repmgr_is_file_external "pg_hba.conf"; then - cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" - else - repmgr_inject_pghba_configuration - fi + repmgr_inject_pghba_configuration if [[ "$REPMGR_USE_PASSFILE" = "true" ]] && [[ ! -f "${REPMGR_PASSFILE_PATH}" ]]; then echo "*:*:*:${REPMGR_USERNAME}:${REPMGR_PASSWORD}" >"${REPMGR_PASSFILE_PATH}" chmod 600 "${REPMGR_PASSFILE_PATH}" @@ -864,6 +860,9 @@ repmgr_initialize() { fi if ! repmgr_is_file_external "pg_hba.conf"; then is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba + else + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_CONF_DIR}/pg_hba.conf" fi if [[ "$REPMGR_ROLE" = "primary" ]]; then if is_boolean_yes "$POSTGRESQL_FIRST_BOOT"; then diff --git a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh index f49f312a0cdbe..5235f9c2d282f 100644 --- a/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh +++ b/bitnami/postgresql-repmgr/14/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh @@ -485,11 +485,7 @@ repmgr_postgresql_configuration() { else repmgr_inject_postgresql_configuration fi - if repmgr_is_file_external "pg_hba.conf"; then - cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" - else - repmgr_inject_pghba_configuration - fi + repmgr_inject_pghba_configuration if [[ "$REPMGR_USE_PASSFILE" = "true" ]] && [[ ! -f "${REPMGR_PASSFILE_PATH}" ]]; then echo "*:*:*:${REPMGR_USERNAME}:${REPMGR_PASSWORD}" >"${REPMGR_PASSFILE_PATH}" chmod 600 "${REPMGR_PASSFILE_PATH}" @@ -864,6 +860,9 @@ repmgr_initialize() { fi if ! repmgr_is_file_external "pg_hba.conf"; then is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba + else + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_CONF_DIR}/pg_hba.conf" fi if [[ "$REPMGR_ROLE" = "primary" ]]; then if is_boolean_yes "$POSTGRESQL_FIRST_BOOT"; then diff --git a/bitnami/postgresql-repmgr/15/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh b/bitnami/postgresql-repmgr/15/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh index f49f312a0cdbe..5235f9c2d282f 100644 --- a/bitnami/postgresql-repmgr/15/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh +++ b/bitnami/postgresql-repmgr/15/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh @@ -485,11 +485,7 @@ repmgr_postgresql_configuration() { else repmgr_inject_postgresql_configuration fi - if repmgr_is_file_external "pg_hba.conf"; then - cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" - else - repmgr_inject_pghba_configuration - fi + repmgr_inject_pghba_configuration if [[ "$REPMGR_USE_PASSFILE" = "true" ]] && [[ ! -f "${REPMGR_PASSFILE_PATH}" ]]; then echo "*:*:*:${REPMGR_USERNAME}:${REPMGR_PASSWORD}" >"${REPMGR_PASSFILE_PATH}" chmod 600 "${REPMGR_PASSFILE_PATH}" @@ -864,6 +860,9 @@ repmgr_initialize() { fi if ! repmgr_is_file_external "pg_hba.conf"; then is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba + else + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_CONF_DIR}/pg_hba.conf" fi if [[ "$REPMGR_ROLE" = "primary" ]]; then if is_boolean_yes "$POSTGRESQL_FIRST_BOOT"; then diff --git a/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh b/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh index f49f312a0cdbe..5235f9c2d282f 100644 --- a/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh +++ b/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/librepmgr.sh @@ -485,11 +485,7 @@ repmgr_postgresql_configuration() { else repmgr_inject_postgresql_configuration fi - if repmgr_is_file_external "pg_hba.conf"; then - cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" - else - repmgr_inject_pghba_configuration - fi + repmgr_inject_pghba_configuration if [[ "$REPMGR_USE_PASSFILE" = "true" ]] && [[ ! -f "${REPMGR_PASSFILE_PATH}" ]]; then echo "*:*:*:${REPMGR_USERNAME}:${REPMGR_PASSWORD}" >"${REPMGR_PASSFILE_PATH}" chmod 600 "${REPMGR_PASSFILE_PATH}" @@ -864,6 +860,9 @@ repmgr_initialize() { fi if ! repmgr_is_file_external "pg_hba.conf"; then is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba + else + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf" + cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_CONF_DIR}/pg_hba.conf" fi if [[ "$REPMGR_ROLE" = "primary" ]]; then if is_boolean_yes "$POSTGRESQL_FIRST_BOOT"; then