Browse code

Merge "Use service postgresql initdb with el6"

Jenkins authored on 2014/02/01 05:20:34
Showing 1 changed files
... ...
@@ -43,7 +43,13 @@ function configure_database_postgresql {
43 43
     if is_fedora; then
44 44
         PG_HBA=/var/lib/pgsql/data/pg_hba.conf
45 45
         PG_CONF=/var/lib/pgsql/data/postgresql.conf
46
-        sudo [ -e $PG_HBA ] || sudo postgresql-setup initdb
46
+        if ! sudo [ -e $PG_HBA ]; then
47
+            if ! [[ $DISTRO =~ (rhel6) ]]; then
48
+                sudo postgresql-setup initdb
49
+            else
50
+                sudo service postgresql initdb
51
+            fi
52
+        fi
47 53
     elif is_ubuntu; then
48 54
         PG_DIR=`find /etc/postgresql -name pg_hba.conf|xargs dirname`
49 55
         PG_HBA=$PG_DIR/pg_hba.conf