- append site-specific access rules pg_hba.conf.d/*.conf to pg_hba.conf
authorMark Huang <mlhuang@cs.princeton.edu>
Fri, 9 Feb 2007 19:26:18 +0000 (19:26 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Fri, 9 Feb 2007 19:26:18 +0000 (19:26 +0000)
plc.d/postgresql

index 0a1bf5a..18ca081 100755 (executable)
@@ -7,7 +7,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: postgresql,v 1.10 2007/01/19 17:25:27 mlhuang Exp $
+# $Id: postgresql,v 1.11 2007/02/05 19:11:06 mlhuang Exp $
 #
 
 # Source function library and configuration
@@ -104,6 +104,11 @@ case "$1" in
            echo "host drupal $PLC_DB_USER $PLC_WWW_IP/32 password"
        ) >>$pghba_conf
 
+       # Append site-specific access rules
+       for file in $pghba_conf.d/*.conf ; do
+           cat "$file" >>$pghba_conf
+       done
+
        # Fix ownership (sed -i changes it)
        chown postgres:postgres $postgresql_conf $pghba_conf