#!/bin/bash
#

adduser postgres
mkdir /home/postgres/data
chown postgres /home/postgres/data
su postgres
/usr/bin/initdb -D /home/postgres/data
