summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-07-21 18:40:35 +0000
committerGitHub <noreply@github.com>2022-07-21 18:40:35 +0000
commitdcbedb1917b992d4746c04846e44ae82fdc23069 (patch)
treee3a39ca8530c0b4381f6748e0b5f0a122d02c3cc
parentfd41c1d6528bf90b7475a34e976a15f2c658d26d (diff)
parent5acfa3fd63e75e9bbb474ca394f2b4416ea910da (diff)
Merge pull request #229 from appeasementPolitik/patch-1
Only call deploy hook when mail cert is renewed
-rwxr-xr-xemailwiz.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/emailwiz.sh b/emailwiz.sh
index f7028df..74b2332 100755
--- a/emailwiz.sh
+++ b/emailwiz.sh
@@ -320,9 +320,9 @@ spfentry="$domain TXT v=spf1 mx a:$maildomain -all"
useradd -m -G mail dmarc
-grep -q "^deploy-hook = postfix reload" /etc/letsencrypt/cli.ini ||
+grep -q '^deploy-hook = echo "$RENEWED_DOMAINS" | grep -q' /etc/letsencrypt/cli.ini ||
echo "
-deploy-hook = service postfix reload && service dovecot reload" >> /etc/letsencrypt/cli.ini
+deploy-hook = echo \"\$RENEWED_DOMAINS\" | grep -q '$maildomain' && service postfix reload && service dovecot reload" >> /etc/letsencrypt/cli.ini
echo "$dkimentry
$dmarcentry