1
0
mirror of https://github.com/coltoneshaw/CS-Repro-Mattermost.git synced 2025-12-23 10:01:30 +01:00
Files
CS-Repro-Mattermost/files/postgres/primary/init.sh
2024-03-29 17:21:34 -04:00

11 lines
528 B
Bash
Executable File

#!/bin/bash
echo "include '/files/postgres/primary/primary_config.conf'" >> /var/lib/postgresql/data/postgresql.conf
psql -U mmuser -d mattermost -c "create role replicauser with replication password 'replicauser_password' login"
psql -U mmuser -d mattermost -c "select pg_create_physical_replication_slot('replica_2_slot');"
psql -U mmuser -d mattermost -c "select pg_create_physical_replication_slot('replica_1_slot');"
echo "host replication replicauser 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf