From d9d739dc68153102db193e2c675065605101631e Mon Sep 17 00:00:00 2001 From: f Date: Sat, 28 Dec 2024 17:59:59 -0300 Subject: [PATCH] fix: ignore empty domain names --- certbotd.sh | 5 +++++ 1 file changed, 5 insertions(+) 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