X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fsv%2Fdovecot%2Fremote.sh;h=475b4fb48374c5fb41be5eca17405d7c5d68f38e;hb=3f60349d0c8c61c3d45b48f040c1da3e231be6ef;hp=d28f0f61335ad66fd7e9b641e72ad75fdd83a078;hpb=3ad6118386977e346d81042e924e5db9c5f15b7d;p=lhc%2Fateliers.git diff --git a/etc/sv/dovecot/remote.sh b/etc/sv/dovecot/remote.sh index d28f0f6..475b4fb 100644 --- a/etc/sv/dovecot/remote.sh +++ b/etc/sv/dovecot/remote.sh @@ -1,14 +1,28 @@ -"$tool"/remote/site-x509-key-decrypt imap."$vm_domainname" | -"$tool"/remote/ssh -l root ' \ - sudo install -d -m 770 -o root -g root \ - /etc/dovecot/'"$vm_domainname"'/ \ - /etc/dovecot/'"$vm_domainname"'/imap \ - /etc/dovecot/'"$vm_domainname"'/imap/x509 ; \ - sudo install -m 644 -o root -g root /dev/stdin \ - /etc/dovecot/'"$vm_domainname"'/imap/x509/.gitignore <<-EOF - key.pem - EOF - sudo install -m 400 -o root -g root \ - /dev/stdin \ - /etc/dovecot/"$vm_domainname"/imap/x509/key.pem - ' +for domain in \ + "$local_domainname" \ + chatperche.org \ + cyclocoop.org \ + lesjantesdunord.org \ + ptitvelo.net \ + veli-velo.org + + do + for protocol in imap pop + do + "$tool"/remote/site-x509-key-decrypt "$protocol"."$domain" | + "$tool"/remote/ssh root@"$local_fqdn" ' \ + sudo install -d -m 770 -o root -g php_roundcube \ + /etc/dovecot/dovecot.'"$domain"'/ + sudo install -d -m 770 -o root -g root \ + /etc/dovecot/dovecot.'"$domain"'/'"$protocol"' \ + /etc/dovecot/dovecot.'"$domain"'/'"$protocol"'/x509 ; \ + sudo install -m 644 -o root -g root /dev/stdin \ + /etc/dovecot/dovecot.'"$domain"'/'"$protocol"'/x509/.gitignore <<-EOF + key.pem + EOF + sudo install -m 400 -o root -g root \ + /dev/stdin \ + /etc/dovecot/dovecot.'"$domain"'/'"$protocol"'/x509/key.pem + ' + done + done