summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-01-01 23:19:31 +0100
committerJonas Smedegaard <dr@jones.dk>2017-01-01 23:19:31 +0100
commit3d73740c027ee86d5a6d10f5a0b1dc0bbc67c434 (patch)
treea74284d6a430f9306c04bc4a529210e760acc82a
parent932e546ce02c5404d804255134ad365c8e3cb06a (diff)
Fix handle non-EC maildomain cert.
-rwxr-xr-xletsencrypt.sh/cron.weekly/local-letsencrypt.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/letsencrypt.sh/cron.weekly/local-letsencrypt.sh b/letsencrypt.sh/cron.weekly/local-letsencrypt.sh
index 0c84001..8a6bef2 100755
--- a/letsencrypt.sh/cron.weekly/local-letsencrypt.sh
+++ b/letsencrypt.sh/cron.weekly/local-letsencrypt.sh
@@ -2,6 +2,13 @@
#
# Renew letsencrypt certificates
-set -e
+set -eu
+# update certdomain certs
letsencrypt.sh --cron
+
+# update non-EC maildomain cert if resolvable and not clashing with certdomain
+maildomain=$(cat /etc/local-REDPILL/$(cat /etc/local-ORG/realm)/mailhost)
+[ -z "$maildomain" ] \
+ || grep ^"$maildomain" /etc/letsencrypt.sh/domains.txt \
+ || letsencrypt.sh --cron --domain "$maildomain" --algo rsa