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:
Jim Hague 2023-08-06 11:07:16 +01:00
parent 3a790075ff
commit f6185d6443
1 changed files with 2 additions and 1 deletions

View File

@ -7,13 +7,14 @@ action=$1
shift
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/
DOMAIN="$1"
case $DOMAIN in
"mail.lunch.org.uk")
systemctl restart exim4
systemctl reload dovecot
;;
esac
}