diff --git a/certbotd.sh b/certbotd.sh index 2ffac70..533847c 100755 --- a/certbotd.sh +++ b/certbotd.sh @@ -104,7 +104,7 @@ case $1 in if test -s "${cert}"; then domain="`certtool -i < "${cert}" | grep Subject: | cut -d = -f 2 | tr -d " "`" - if grep -q "^${subject}$" "${domains}"; then + if grep -q "^${domain}$" "${domains}"; then echo "ok - ${domain} certificate correctly set" else not_ok "${domain} certificate is not needed anymore, removing"