diff --git a/certbotd.sh b/certbotd.sh index ad6b497..cafeba0 100755 --- a/certbotd.sh +++ b/certbotd.sh @@ -162,13 +162,13 @@ case $1 in fi # The file exists but it's empty and it was issued before elif test -f "/etc/letsencrypt/renewal/${domain}.conf" && test -d "/etc/letsencrypt/archive/${domain}"; then - ok "${domain} renewal conf was empty, fixing..." - other_renewal="$(grep -l -m 1 "^authenticator = webroot$" /etc/letsencrypt/renewal/*.conf | head -1)" if test -z "${other_renewal}"; then - not_ok "${domain} couldn't fix" + not_ok "${domain} renewal conf was empty but couldn't fix" ensure 1 + else + ok "${domain} renewal conf was empty and it was fixed" fi other_domain="$(basename "${other_renewal}" .conf)"