X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fsv%2Fdovecot%2Flocal.sh;h=9b0f37b0c058239bece0820c7ddde2fa3779493d;hp=7f68365b2dae741b1a556ba618e6d03c4c1d1ca9;hb=0d705d8e2a919ee40866307aa3e18b1a5c4e7583;hpb=3ad6118386977e346d81042e924e5db9c5f15b7d diff --git a/etc/sv/dovecot/local.sh b/etc/sv/dovecot/local.sh index 7f68365..9b0f37b 100644 --- a/etc/sv/dovecot/local.sh +++ b/etc/sv/dovecot/local.sh @@ -1,10 +1,12 @@ "$tool"/local/apt-get-install dovecot-imapd dovecot-managesieved dovecot-sieve "$tool"/local/insserv-remove dovecot -local hint="run before: ./vm_remote runit_configure dovecot" -assert "sudo test -f /etc/dovecot/\"$vm_domainname\"/imap/x509/key.pem" hint + +sudo test -f /etc/dovecot/\"$local_domainname\"/imap/x509/key.pem || +printf '%s\n' "$(tput rev)run before: remote/runit-configure dovecot$(tput sgr0)" && exit 1 + sudo install -m 400 -o root -g root \ - "$tool"/var/pub/x509/imap."$vm_domainname"/crt+crl.self-signed.pem \ - /etc/dovecot/"$vm_domainname"/imap/x509/crt+crl.self-signed.pem + "$tool"/var/pub/x509/imap."$local_domainname"/crt+crl.self-signed.pem \ + /etc/dovecot/"$local_domainname"/imap/x509/crt+crl.self-signed.pem sudo install -d -m 770 -o root -g root \ /etc/skel/etc/mail \ /etc/skel/etc/sieve @@ -12,7 +14,7 @@ sudo install -d -m 1777 -o root -g root \ /var/lib/dovecot-control \ /var/lib/dovecot-index m4 \ - --define=VM_DOMAINNAME=$vm_domainname \ + --define=LOCAL_DOMAINNAME=$local_domainname \ <"$tool"/etc/dovecot/local.conf.m4 | sudo install -m 644 -o root -g root /dev/stdin \ /etc/dovecot/local.conf