14 lines
340 B
Bash
14 lines
340 B
Bash
#!/bin/bash -e
|
|
|
|
[ -d "/srv/postgresql" ] && exit 0 || true
|
|
|
|
/bin/mkdir /srv/postgresql
|
|
/bin/chown postgres: /srv/postgresql
|
|
mkdir /var/lib/pgsql
|
|
/bin/chown postgres: /var/lib/pgsql
|
|
/usr/bin/postgresql-setup --initdb
|
|
/bin/rm /srv/postgresql/postgresql.conf
|
|
/bin/rm /srv/postgresql/pg_hba.conf
|
|
/bin/rm /srv/postgresql/pg_ident.conf
|
|
|
|
exit 0
|