diff options
author | Jonas Smedegaard <dr@jones.dk> | 2018-01-06 13:35:15 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2018-01-06 13:35:15 +0100 |
commit | f75d206c81f53df2abcd6c934a7e64d82e325a37 (patch) | |
tree | fa2bb51aa783b21388fba592e8b668f1e7ad71ad | |
parent | 5727bffa2e7ff0cd9a4e732d4c6b0ee5b7ea10e2 (diff) |
Fix revert to include canonical hostname (fqdn) in (non-certdomain) maildomain cert.
This reverts commit 5727bffa2e7ff0cd9a4e732d4c6b0ee5b7ea10e2.
-rwxr-xr-x | dehydrated/cron.weekly/local-dehydrated | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dehydrated/cron.weekly/local-dehydrated b/dehydrated/cron.weekly/local-dehydrated index 8408c13..2997440 100755 --- a/dehydrated/cron.weekly/local-dehydrated +++ b/dehydrated/cron.weekly/local-dehydrated @@ -6,9 +6,14 @@ set -eu # update non-EC maildomain cert if resolvable and not a certdomain maildomain=$(cat /etc/local-REDPILL/$(cat /etc/local-ORG/realm)/mailhost) +fqdn=$(hostname --fqdn) +[ -z "$fqdn" ] \ + || [ "$maildomain" = "$fqdn" ] \ + || extradomains=${extradomains:+$extradomains }$fqdn domain=$(hostname --domain) [ -z "$domain" ] \ || [ "$maildomain" = "$domain" ] \ + || [ "$fqdn" = "$domain" ] \ || extradomains=${extradomains:+$extradomains }$domain [ -z "$maildomain" ] \ || grep ^"$maildomain" /etc/dehydrated/domains.txt \ |