diff --git a/tests/p_postgresql/1-config-postgresql.sh b/tests/p_postgresql/1-config-postgresql.sh index 4ec9322..6f51a5c 100755 --- a/tests/p_postgresql/1-config-postgresql.sh +++ b/tests/p_postgresql/1-config-postgresql.sh @@ -3,13 +3,16 @@ t_Log "Running $0 - initializing and starting PostgreSQL" -if (t_GetPkgRel postgresql | grep -q el6) -then - t_Log "Initialize PostgreSQL DB " +t_Log "Initialize PostgreSQL DB " +if (t_GetPkgRel postgresql | grep -q el7) then + postgresql-setup initdb +else if (t_GetPkgRel postgresql | grep -q el6) then service postgresql initdb - t_ServiceControl postgresql start - sleep 15 -else - t_ServiceControl postgresql start - sleep 15 -fi +fi +fi + +t_ServiceControl postgresql start +sleep 15 + + +