From d9dd0fc4593313fdb3e8a2cfb4e4848e687657a0 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 19 Jul 2018 14:13:12 +0200 Subject: Fix support host without /etc/mailname matching REDPILL mailhost. --- dehydrated/cron.weekly/local-dehydrated | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dehydrated') 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 -- cgit v1.2.3