Small certificate hook updates
1. Preserve mode, owndership, timestamps when copying certificates. Ownership is updated after copying. 2. Reload dovecot on mail.lunch.org.uk.
This commit is contained in:
parent
3a790075ff
commit
f6185d6443
|
@ -7,13 +7,14 @@ action=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
deploy_cert() {
|
deploy_cert() {
|
||||||
cp -R /var/lib/dehydrated/certs/* /var/local/certificates/
|
cp -a /var/lib/dehydrated/certs/* /var/local/certificates/
|
||||||
chown -R root:ssl-cert /var/local/certificates/
|
chown -R root:ssl-cert /var/local/certificates/
|
||||||
|
|
||||||
DOMAIN="$1"
|
DOMAIN="$1"
|
||||||
case $DOMAIN in
|
case $DOMAIN in
|
||||||
"mail.lunch.org.uk")
|
"mail.lunch.org.uk")
|
||||||
systemctl restart exim4
|
systemctl restart exim4
|
||||||
|
systemctl reload dovecot
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue