# Time to initialize the database
PGROOT=/var/lib/pgsql

if [ ! -d $PGROOT ]; then
  install -dm0700 -o postgres -g postgres $PGROOT
  install -dm0700 -o postgres -g postgres $PGROOT/data
  su - postgres -c "/usr/bin/initdb --locale en_US.UTF-8 -E UTF8 -D $PGROOT/data"
fi
# Done with database init.

for mod in DBD-Pg php5 php5-suhosin; do
  if module_installed $mod; then
    lin -c $mod
  fi
done
