Only manage access rules for MyPLC databses (planetlab5 and drupal). Ignore access...
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 21 Feb 2012 21:42:16 +0000 (16:42 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 21 Feb 2012 21:42:16 +0000 (16:42 -0500)
plc.d/postgresql

index 2e87033..3b77e53 100755 (executable)
@@ -92,8 +92,8 @@ case "$1" in
        echo "timezone='UTC'" >> $postgresql_conf
 
        ######## /var/lib/pgsql/data/pg_hba.conf
-       # Disable access to all DBs from all hosts
-       sed -i -e '/^\(host\|local\)/d' $pghba_conf
+    # Disable access to MyPLC and drupal DBs from all hosts
+    sed -i -e '/^\(host\|local\)\s\($PLC_DB_NAME\|drupal\)/d' $pghba_conf
 
        # Enable passwordless localhost access
        echo "local all all trust" >>$pghba_conf