summaryrefslogtreecommitdiff
path: root/dehydrated
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2018-10-20 10:02:14 +0200
committerJonas Smedegaard <dr@jones.dk>2018-10-20 10:02:14 +0200
commit1b0101fd285e4a1e8a74f232d03a6da31a94de03 (patch)
tree9a3aadff7ec3f45bed485fe3a9882d0545bfa9cd /dehydrated
parent2f01ae15959caf5d6963edb143e0cb52b20d677d (diff)
Tidy: Use internal variable mailhost (not maildomain).
Diffstat (limited to 'dehydrated')
-rwxr-xr-xdehydrated/cron.weekly/local-dehydrated16
1 files changed, 8 insertions, 8 deletions
diff --git a/dehydrated/cron.weekly/local-dehydrated b/dehydrated/cron.weekly/local-dehydrated
index 2aa495d..24ca7e7 100755
--- a/dehydrated/cron.weekly/local-dehydrated
+++ b/dehydrated/cron.weekly/local-dehydrated
@@ -4,22 +4,22 @@
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
+# update non-EC mailhost cert if resolvable and not a certdomain
+mailhost=$(cat /etc/local-REDPILL/$(cat /etc/local-ORG/realm)/mailhost) || true
mailname=$(cat /etc/mailname) || true
fqdn=$(hostname --fqdn)
[ -z "$fqdn" ] \
- || [ "$maildomain" = "$fqdn" ] \
+ || [ "$mailhost" = "$fqdn" ] \
|| extradomains=${extradomains:+$extradomains }$fqdn
domain=$(hostname --domain)
[ -z "$domain" ] \
- || [ "$maildomain" = "$domain" ] \
+ || [ "$mailhost" = "$domain" ] \
|| [ "$fqdn" = "$domain" ] \
|| extradomains=${extradomains:+$extradomains }$domain
-[ -z "$maildomain" ] \
- || [ "$maildomain" != "$mailname" ] \
- || grep ^"$maildomain" /etc/dehydrated/domains.txt \
- || dehydrated --cron --domain "$maildomain $extradomains" --algo rsa
+[ -z "$mailhost" ] \
+ || [ "$mailhost" != "$mailname" ] \
+ || grep ^"$mailhost" /etc/dehydrated/domains.txt \
+ || dehydrated --cron --domain "$mailhost $extradomains" --algo rsa
# update certdomain certs
dehydrated --cron "$@"