Project

General

Profile

Bug #2305 » rudder-reports-fix-postgresql-starting.patch

Olivier LI KIANG CHEONG, 2012-02-27 09:42

View differences:

SPECS/rudder-reports.spec 2012-02-04 04:31:02.154836431 +0100
/etc/init.d/postgresql status > /dev/null
if [ $? -ne 0 ]
then
%if 0%{?el6}
/etc/init.d/postgresql initdb
%endif
/etc/init.d/postgresql start
fi
#HACK: Give rights for login without unix account
......
echo "Setting postgresql as a boot service"
/sbin/chkconfig --add postgresql
%if 0%{?el6}
/sbin/chkconfig postgresql on
%endif
dbname="rudder"
usrname="rudder"
RES=$(su - postgres -c "psql -t -c \"select count(1) from pg_catalog.pg_database where datname = '$dbname'\"")
(2-2/2)