diff --git a/certbotd.sh b/certbotd.sh index 338f269..cb902dd 100755 --- a/certbotd.sh +++ b/certbotd.sh @@ -108,6 +108,11 @@ case $1 in if test -s "${cert}"; then domain="`certtool -i < "${cert}" | grep Subject: | cut -d = -f 2 | tr -d " "`" + if test -z "${domain}" ; then + not_ok "couldn't find domain name for certificate ${cert}" + continue + fi + if grep -q "^${domain}$" "${domains}"; then echo "ok - ${domain} certificate correctly set" else