diff options
author | Jonas Smedegaard <dr@jones.dk> | 2018-07-19 14:13:12 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2018-07-19 14:13:12 +0200 |
commit | d9dd0fc4593313fdb3e8a2cfb4e4848e687657a0 (patch) | |
tree | 5208b5cc69f21e65bc3ca0f0f145e5624f1d0441 /dehydrated/cron.weekly/local-dehydrated | |
parent | 10586beb6ef8e3d452ef98e6108cd45a9f85ce0f (diff) |
Fix support host without /etc/mailname matching REDPILL mailhost.
Diffstat (limited to 'dehydrated/cron.weekly/local-dehydrated')
-rwxr-xr-x | dehydrated/cron.weekly/local-dehydrated | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dehydrated/cron.weekly/local-dehydrated b/dehydrated/cron.weekly/local-dehydrated index ae7db41..2aa495d 100755 --- a/dehydrated/cron.weekly/local-dehydrated +++ b/dehydrated/cron.weekly/local-dehydrated @@ -6,6 +6,7 @@ set -eu # update non-EC maildomain cert if resolvable and not a certdomain maildomain=$(cat /etc/local-REDPILL/$(cat /etc/local-ORG/realm)/mailhost) || true +mailname=$(cat /etc/mailname) || true fqdn=$(hostname --fqdn) [ -z "$fqdn" ] \ || [ "$maildomain" = "$fqdn" ] \ @@ -16,6 +17,7 @@ domain=$(hostname --domain) || [ "$fqdn" = "$domain" ] \ || extradomains=${extradomains:+$extradomains }$domain [ -z "$maildomain" ] \ + || [ "$maildomain" != "$mailname" ] \ || grep ^"$maildomain" /etc/dehydrated/domains.txt \ || dehydrated --cron --domain "$maildomain $extradomains" --algo rsa |