You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.1.0_35_slave_edit_recovery_conf.sh 370B

1234567891011121314
  1. #! /usr/bin/env bash
  2. if [ "${POSTGRES_SLAVE_MODE}" != 1 ]
  3. then
  4. echo "Database is not in slave mode. Exiting."
  5. exit 0
  6. fi
  7. cat <<-EOF > "${PGDATA}/recovery.conf"
  8. standby_mode = 'on'
  9. primary_conninfo = 'host=${POSTGRES_REP_HOST} port=${POSTGRES_REP_PORT} user=${POSTGRES_REP_USER} password=${POSTGRES_REP_PASSWORD}'
  10. trigger_file = '/tmp/postgresql.trigger'
  11. EOF