File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- PGSQLDIR=/var/lib/postgresql/data
4-
53# Preparing SSL certificates
6- cp ${SQL_TEMP_DIR} /fake_cert.pem ${PGSQLDIR } /.
7- cp ${SQL_TEMP_DIR} /fake_key.pem ${PGSQLDIR } /.
8- chmod 600 ${PGSQLDIR } /fake*
9- chown postgres:postgres ${PGSQLDIR } /fake*
4+ cp ${SQL_TEMP_DIR} /fake_cert.pem ${PGDATA } /.
5+ cp ${SQL_TEMP_DIR} /fake_key.pem ${PGDATA } /.
6+ chmod 600 ${PGDATA } /fake*
7+ chown postgres:postgres ${PGDATA } /fake*
108
119# Copy custom config
12- cp ${SQL_TEMP_DIR} /postgresql.conf ${PGSQLDIR } /.
13- cp ${SQL_TEMP_DIR} /pg_hba.conf ${PGSQLDIR } /.
10+ cp ${SQL_TEMP_DIR} /postgresql.conf ${PGDATA } /.
11+ cp ${SQL_TEMP_DIR} /pg_hba.conf ${PGDATA } /.
1412
1513# Copy db scheme
16- cp ${SQL_TEMP_DIR} /pg.sql ${PGSQLDIR } /.
14+ cp ${SQL_TEMP_DIR} /pg.sql ${PGDATA } /.
1715
1816# Configuring postgres
1917psql -U postgres -c " CREATE ROLE mongooseim PASSWORD 'mongooseim_secret' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;"
2018psql -U postgres -c " CREATE DATABASE mongooseim;"
2119# Creating schema
22- psql -U postgres -q -d mongooseim -f ${PGSQLDIR } /pg.sql
20+ psql -U postgres -q -d mongooseim -f ${PGDATA } /pg.sql
You can’t perform that action at this time.
0 commit comments