#!/bin/bash

DBDIR="/var/db/pgsql/data"

if [ "$(ls -A $DBDIR)" ]; then
    exit 0
fi

/usr/bin/initdb -D "$DBDIR"
