diff options
-rwxr-xr-x | letsencrypt.sh/cron.weekly/local-letsencrypt.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/letsencrypt.sh/cron.weekly/local-letsencrypt.sh b/letsencrypt.sh/cron.weekly/local-letsencrypt.sh index 8a6bef2..0600730 100755 --- a/letsencrypt.sh/cron.weekly/local-letsencrypt.sh +++ b/letsencrypt.sh/cron.weekly/local-letsencrypt.sh @@ -9,6 +9,15 @@ 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) +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/letsencrypt.sh/domains.txt \ - || letsencrypt.sh --cron --domain "$maildomain" --algo rsa + || letsencrypt.sh --cron --domain "$maildomain $extradomains" --algo rsa |