contrib/postgresql/post-install

11 lines
183 B
Bash
Executable File

#!/bin/sh -e
_USER=postgres
_HOME=/var/pgsql/data
_GROUP=postgres
test -d $_HOME && exit 0
install -d -o $_USER -g $_GROUP $_HOME
su -s /bin/sh -c "pg_ctl -D $_HOME initdb" $_USER