X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fsv%2Fdovecot%2Fremote.sh;h=696ee43f5f105662281283981e069b8eb12d0e73;hb=fe4eef74ace79d693bd4c3b0eef7a69594396a0e;hp=3255de7e17d8fcf0d1c87a405c5a0fc0d6d5cde9;hpb=f5e12fec2c7ef8d743e2d3e32c3bbe37b40c7a73;p=lhc%2Fateliers.git diff --git a/etc/sv/dovecot/remote.sh b/etc/sv/dovecot/remote.sh index 3255de7..696ee43 100644 --- a/etc/sv/dovecot/remote.sh +++ b/etc/sv/dovecot/remote.sh @@ -1,14 +1,29 @@ -"$tool"/remote/site-x509-key-decrypt imap."$local_domainname" | -"$tool"/remote/ssh root@"$local_fqdn" ' \ - sudo install -d -m 770 -o root -g root \ - /etc/dovecot/'"$local_domainname"'/ \ - /etc/dovecot/'"$local_domainname"'/imap \ - /etc/dovecot/'"$local_domainname"'/imap/x509 ; \ - sudo install -m 644 -o root -g root /dev/stdin \ - /etc/dovecot/'"$local_domainname"'/imap/x509/.gitignore <<-EOF - key.pem - EOF - sudo install -m 400 -o root -g root \ - /dev/stdin \ - /etc/dovecot/'"$local_domainname"'/imap/x509/key.pem - ' +for domain in \ + "$local_domainname" \ + chatperche.org \ + cyclocoop.org \ + lesjantesdunord.org \ + ptitvelo.net \ + veli-velo.org \ + wiklou.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