#!/bin/sh if [ -z $(which initdb) ] ; then echo "Postgres not found, you may need to launch like so: PATH=\$PATH:/usr/lib/postgresql/9.3/bin/ $0" exit 1 fi ## Thanks to Matwey V. Kornilov ( https://github.com/matwey ) for ## this: initdb --locale en_US.UTF-8 datadir echo "ssl = on" >> datadir/postgresql.conf cp test_data/epgsql.crt datadir/server.crt cp test_data/epgsql.key datadir/server.key cp test_data/root.crt datadir/root.crt cp test_data/root.key datadir/root.key chmod 0600 datadir/server.key cat > datadir/pg_hba.conf <