From: Thierry Parmentelat Date: Wed, 15 Feb 2012 13:33:54 +0000 (+0100) Subject: service postgresql initdb not available with systemd X-Git-Tag: plcapi-5.0-37~7 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=e42146067a41cd93ea01a822fdc7bcd976c64cb6 service postgresql initdb not available with systemd systemctl is yet broken anyways, at least in current test&build vserver-based infrastructure --- diff --git a/plc.d/postgresql b/plc.d/postgresql index 4f986e6..2e87033 100755 --- a/plc.d/postgresql +++ b/plc.d/postgresql @@ -70,8 +70,15 @@ case "$1" in # PostgreSQL must be started at least once to bootstrap # /var/lib/pgsql/data if [ ! -f $postgresql_conf ] ; then - service postgresql initdb &> /dev/null || : - check +# fedora 16 uses systemd +# http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html + if type postgresql-setup >& /dev/null ; then + postgresql-setup initdb || : + check + else + service postgresql initdb &> /dev/null || postgresql : + check + fi fi ######## /var/lib/pgsql/data/postgresql.conf