detect wildcard certs, fix #98
This commit is contained in:
parent
1ab9f432df
commit
b50fb342f1
@ -42,7 +42,7 @@ subdom="mail"
|
|||||||
maildomain="$subdom.$domain"
|
maildomain="$subdom.$domain"
|
||||||
certdir="/etc/letsencrypt/live/$maildomain"
|
certdir="/etc/letsencrypt/live/$maildomain"
|
||||||
|
|
||||||
[ ! -d "$certdir" ] && certdir="$(dirname "$(certbot certificates 2>/dev/null | grep "$maildomain" -A 2 | awk '/Certificate Path/ {print $3}')")"
|
[ ! -d "$certdir" ] && certdir="$(dirname "$(certbot certificates 2>/dev/null | grep "$maildomain\|*.$domain" -A 2 | awk '/Certificate Path/ {print $3}' | head -n1)")"
|
||||||
|
|
||||||
[ ! -d "$certdir" ] && echo "Note! You must first have a Let's Encrypt Certbot HTTPS/SSL Certificate for $maildomain.
|
[ ! -d "$certdir" ] && echo "Note! You must first have a Let's Encrypt Certbot HTTPS/SSL Certificate for $maildomain.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user