stage /etc/repmgr.conf

This commit is contained in:
Bernhard Radermacher
2026-02-19 11:22:43 +01:00
parent 9825164455
commit 02001ff435

View File

@@ -19,7 +19,8 @@ if [[ -z $UPSTREAM ]]; then
echo "local repmgr repmgr trust" >> /var/lib/postgresql/data/pg_hba.conf echo "local repmgr repmgr trust" >> /var/lib/postgresql/data/pg_hba.conf
echo "host repmgr repmgr ${NETWORK:-100.64.0.0/10} trust" >> /var/lib/postgresql/data/pg_hba.conf echo "host repmgr repmgr ${NETWORK:-100.64.0.0/10} trust" >> /var/lib/postgresql/data/pg_hba.conf
# create user for replication # create user for replication
psql -c "CREATE USER repmgr WITH REPLICATION ENCRYPTED PASSWORD '${REPLICATOR_PASSWORD}'; CREATE DATABASE repmgr WITH OWNER repmgr;" psql -c "CREATE USER repmgr WITH REPLICATION ENCRYPTED PASSWORD '${REPLICATOR_PASSWORD}';"
psql -c "CREATE DATABASE repmgr WITH OWNER repmgr;"
psql -c 'ALTER USER repmgr SET search_path TO repmgr, "$user", public;' psql -c 'ALTER USER repmgr SET search_path TO repmgr, "$user", public;'
echo "node_id = 1" >> /etc/repmgr.conf echo "node_id = 1" >> /etc/repmgr.conf