- fix ownership of pgsql data directory in case rpm installation changed it
authorMark Huang <mlhuang@cs.princeton.edu>
Mon, 27 Mar 2006 18:50:20 +0000 (18:50 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Mon, 27 Mar 2006 18:50:20 +0000 (18:50 +0000)
guest.init

index 2df5a9e..06607bb 100755 (executable)
@@ -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