# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: postgresql 635 2007-07-05 11:08:14Z thierry $
+# $Id$
#
# Source function library and configuration
return 1
}
+postgresql_init ()
+{
+ service postgresql initdb &> /dev/null || :
+ postgresql_start
+}
+
case "$1" in
start)
if [ "$PLC_DB_ENABLED" != "1" ] ; then
# PostgreSQL must be started at least once to bootstrap
# /var/lib/pgsql/data
if [ ! -f $postgresql_conf ] ; then
- postgresql_start
+ postgresql_init
check
service postgresql stop
check