Fails if we don't have two challenges
Hi
I'm a very happy user of easywildcard.
For a couple of domains I seen this error
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: smtp.no.ist.com
Type: dns
Detail: DNS problem: SERVFAIL looking up TXT for
_acme-challenge.smtp.no.ist.com - the domain's nameservers may be
malfunctioning
when running docker run -v /etc/letsencrypt/:/etc/letsencrypt --rm -i -e "[email protected]" -e "DOMAIN=smtp.no.ist.com" easywildcard
The reason is certbot only gets one challenge, and bind is only startet if there are two challenges, due to https://github.com/Fmstrat/easywildcard/blob/master/hooks/auth-hook.sh's if [ $NUM -eq 2 ]
My workaround is to run docker run -v /etc/letsencrypt/:/etc/letsencrypt -v /tmp/:/tmp --rm -i -e "[email protected]" -e "DOMAIN=smtp.no.ist.com" easywildcard twice ... this way /tmp/easywildcard/VALIDATION will contain two challanges and bind will start.
Please replace if [ $NUM -eq 2 ] with if [ $NUM -ge 1 ]
Have a nice day. Greetings, Christian