bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_postgresql/1-config-postgresql.sh

Athmane Madjoudj e7a36a
#!/bin/bash
Athmane Madjoudj e7a36a
# Author: Athmane Madjoudj <athmanem@gmail.com>
Christoph Galuschka 6461f0
Christoph Galuschka 6461f0
t_Log "Running $0 - initializing and starting PostgreSQL"
Athmane Madjoudj e7a36a
Borislav Andric d7cea1
t_Log "Initialize PostgreSQL DB "
Pablo Greco ac5fc7
if (t_GetPkgRel postgresql | grep -q el8) then
Pablo Greco ac5fc7
   postgresql-setup --initdb
Pablo Greco ac5fc7
elif (t_GetPkgRel postgresql | grep -q el7) then
Borislav Andric d7cea1
   postgresql-setup initdb
Pablo Greco ac5fc7
elif (t_GetPkgRel postgresql | grep -q el6) then
Athmane Madjoudj e7a36a
   service postgresql initdb
Borislav Andric d7cea1
fi
Borislav Andric d7cea1
Borislav Andric d7cea1
t_ServiceControl postgresql start
Borislav Andric d7cea1
sleep 15
Borislav Andric d7cea1
Borislav Andric d7cea1
Borislav Andric d7cea1