diff options
author | Luke Smith <luke@lukesmith.xyz> | 2023-01-27 12:43:29 -0500 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2023-01-27 12:43:29 -0500 |
commit | 768baa379f206783c6ad88fc21a0262a7ecbe26a (patch) | |
tree | 4ae24dc913b7e32febdfcfa7a310820f3ac424e2 | |
parent | 50cdd5ddbcc1cdedbe0efe2e6d1d74310947d7ca (diff) |
check for wildcard certs as well, resolve #257
-rw-r--r-- | emailwiz.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/emailwiz.sh b/emailwiz.sh index f6d6dfa..461d0e3 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -49,7 +49,7 @@ for port in 80 993 465 25 587; do done [ ! -d "$certdir" ] && - possiblecert="$(certbot certificates 2>/dev/null | grep "Domains:\.* $maildomain\(\s\|$\)" -A 2 | awk '/Certificate Path/ {print $3}' | head -n1)" && + possiblecert="$(certbot certificates 2>/dev/null | grep "Domains:\.* \(\*\.$domain\|$maildomain\)\(\s\|$\)" -A 2 | awk '/Certificate Path/ {print $3}' | head -n1)" && certdir="${possiblecert%/*}" [ ! -d "$certdir" ] && |