X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fsv%2Fdovecot%2Fremote.sh;h=41a78919b1e7832c8b00c3d154567924a93efcef;hp=0de2eaaf27ac3027447b5b68872ea44b62a6739d;hb=b75d4503ef9c919231c0c02daf5a1ed1e57c73af;hpb=eefc410c23df14d9e47bfc1eedcfb500d557c5a8 diff --git a/etc/sv/dovecot/remote.sh b/etc/sv/dovecot/remote.sh index 0de2eaa..41a7891 100644 --- a/etc/sv/dovecot/remote.sh +++ b/etc/sv/dovecot/remote.sh @@ -1,14 +1,19 @@ -rule _x509_site_key_decrypt imap."$vm_domainname" | -rule 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" \ + cyclocoop.org + do + "$tool"/remote/site-x509-key-decrypt imap."$domain" | + "$tool"/remote/ssh root@"$local_fqdn" ' \ + sudo install -d -m 770 -o root -g root \ + /etc/dovecot/'"$domain"'/ \ + /etc/dovecot/'"$domain"'/imap \ + /etc/dovecot/'"$domain"'/imap/x509 ; \ + sudo install -m 644 -o root -g root /dev/stdin \ + /etc/dovecot/'"$domain"'/imap/x509/.gitignore <<-EOF + key.pem + EOF + sudo install -m 400 -o root -g root \ + /dev/stdin \ + /etc/dovecot/'"$domain"'/imap/x509/key.pem + ' + done