From 1272d2b1edb174f75380a9c0470c65d18c1f818b Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Thu, 29 Nov 2007 21:45:48 +0000 Subject: [PATCH] Initialize the database correctly on F7+. --- plc.d/postgresql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.47.0