From: Daniel Hokka Zakrisson Date: Thu, 29 Nov 2007 21:45:48 +0000 (+0000) Subject: Initialize the database correctly on F7+. X-Git-Tag: myplc-4.0-15~23 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1272d2b1edb174f75380a9c0470c65d18c1f818b;p=myplc.git Initialize the database correctly on F7+. --- diff --git a/plc.d/postgresql b/plc.d/postgresql index f5ad0d0..43fc7aa 100755 --- a/plc.d/postgresql +++ b/plc.d/postgresql @@ -46,6 +46,12 @@ postgresql_start () return 1 } +postgresql_init () +{ + service postgresql initdb &> /dev/null || : + postgresql_start +} + case "$1" in start) if [ "$PLC_DB_ENABLED" != "1" ] ; then @@ -69,7 +75,7 @@ case "$1" in # 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