From: Mark Huang Date: Mon, 27 Mar 2006 18:50:20 +0000 (+0000) Subject: - fix ownership of pgsql data directory in case rpm installation changed it X-Git-Tag: myplc-0_4-rc1~130 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b4d8c6374cc29d3585852b857295a0698d4a1906;p=myplc.git - fix ownership of pgsql data directory in case rpm installation changed it --- diff --git a/guest.init b/guest.init index 2df5a9e..06607bb 100755 --- a/guest.init +++ b/guest.init @@ -6,7 +6,7 @@ # # description: Manages all PLC services on this machine # -# $Id: plc.init,v 1.6 2005/04/24 19:48:11 mlhuang Exp $ +# $Id: guest.init,v 1.1.1.1 2006/03/27 17:36:46 mlhuang Exp $ # PATH=/sbin:/bin:/usr/bin:/usr/sbin @@ -191,6 +191,9 @@ config_postgresql () echo "PGLOG=/var/log/pgsql" ) >>/etc/sysconfig/pgsql/postgresql + # Fix ownership (rpm installation may have changed it) + chown -R -H postgres:postgres $(dirname $PGDATA) + # PostgreSQL must be started at least once to bootstrap # /var/lib/pgsql/data if [ ! -f $postgresql_conf ] ; then