san domain handling centralised

This commit is contained in:
Sebastian Hugentobler 2017-09-04 16:10:39 +02:00
parent f6b4c20e4a
commit 51cc43c11d
4 changed files with 17 additions and 10 deletions

View file

@ -2,13 +2,15 @@
cd /var/lib/postgresql
SAN_DOMAINS=$(/bin/concat-sans)
OLD_MOD=$(stat -c %y /var/lib/postgresql/.lego/certificates/${POSTGRES_DOMAIN}.crt)
lego \
--accept-tos \
--server="${POSTGRES_CA}" \
--email="${POSTGRES_ACME_EMAIL}" \
--domains="${POSTGRES_DOMAIN}" \
--domains="${POSTGRES_DOMAIN}" ${SAN_DOMAINS} \
--dns="${POSTGRES_DNS_PROVIDER}" \
renew --days 30