Correction : vm_hosted : rule_postfix_configure : permissions .
[lhc/ateliers.git] / vm_hosted
index 4f305be..4a4749d 100755 (executable)
--- a/vm_hosted
+++ b/vm_hosted
@@ -987,15 +987,8 @@ rule_postfix_configure () {
        sudo install -m 640 -o root -g root /dev/stdin /etc/postfix/.gitignore <<-EOF
                *.db
                EOF
-       sudo install -d -m 770 -o root -g root \
-        /etc/postfix/$vm_domainname/ \
-        /etc/postfix/$vm_domainname/smtp \
-        /etc/postfix/$vm_domainname/smtp/x509 \
-        /etc/postfix/$vm_domainname/smtp/x509/ca \
-        /etc/postfix/$vm_domainname/smtpd \
-        /etc/postfix/$vm_domainname/smtpd/x509 \
-        /etc/postfix/$vm_domainname/smtpd/x509/ca
-       sudo install -d -m 770 -o root -g root \
+       sudo install -d -m 771 -o root -g root \
+        /etc/postfix/ \
         /etc/postfix/$vm_domainname/ \
         /etc/postfix/$vm_domainname/smtp \
         /etc/postfix/$vm_domainname/smtp/x509 \
@@ -1074,6 +1067,12 @@ rule_postfix_configure () {
  }
 rule_postgresql_configure () {
        rule apt_get_install postgresql-9.1
+       if [ ! -d /var/lib/postgresql/9.1/ ]; then
+           pg_createcluster -u postgres --start 9.1 main
+       fi
+       sudo install -m 660 -o root -g root \
+               "$tool"/etc/postgresql/9.1/main/postgresql.conf \
+               /etc/postgresql/9.1/main/postgresql.conf
        sudo service postgresql restart
  }
 rule_openerp_configure () {