- Add output for error 'too many certificates already issued'.
- Fix error on output if http request failed.
This commit is contained in:
parent
031b099eff
commit
e613af5262
@ -9,6 +9,9 @@ STR_PROCESSED="marked to be validated"
|
|||||||
STR_SUCCESS="Certificate has been produced"
|
STR_SUCCESS="Certificate has been produced"
|
||||||
STR_INVALID_CHALLENGE="Error: Invalid Challenge"
|
STR_INVALID_CHALLENGE="Error: Invalid Challenge"
|
||||||
STR_HTTP_REQUEST_FAILED="Error: HTTP-Request failed"
|
STR_HTTP_REQUEST_FAILED="Error: HTTP-Request failed"
|
||||||
|
STR_TOO_MANY_CERTIFICATES="too many certificates already issued for"
|
||||||
|
|
||||||
|
ERR_MSG_TOO_MANY_CERTS="too many certificates already issued"
|
||||||
|
|
||||||
# -------------
|
# -------------
|
||||||
# --- Some functions
|
# --- Some functions
|
||||||
@ -1548,6 +1551,9 @@ _hosts_processed="\$(cat \$_logfile | grep "$STR_PROCESSED" 2> /dev/null | awk '
|
|||||||
_successfully_created_hosts="\$(cat \$_logfile | grep "$STR_SUCCESS" 2> /dev/null | awk '{print\$3}')"
|
_successfully_created_hosts="\$(cat \$_logfile | grep "$STR_SUCCESS" 2> /dev/null | awk '{print\$3}')"
|
||||||
_invalid_challenge="\$(cat \$_logfile | grep "$STR_INVALID_CHALLENGE" 2> /dev/null | awk '{print\$3}')"
|
_invalid_challenge="\$(cat \$_logfile | grep "$STR_INVALID_CHALLENGE" 2> /dev/null | awk '{print\$3}')"
|
||||||
_http_request_failed="\$(cat \$_logfile | grep "$STR_HTTP_REQUEST_FAILED" 2> /dev/null | awk '{print\$3}')"
|
_http_request_failed="\$(cat \$_logfile | grep "$STR_HTTP_REQUEST_FAILED" 2> /dev/null | awk '{print\$3}')"
|
||||||
|
if grep -i -q "$ERR_MSG_TOO_MANY_CERTS" \$_logfile 2> /dev/null ; then
|
||||||
|
_too_many_certs_err_msg="\$(grep -i "$ERR_MSG_TOO_MANY_CERTS" \$_logfile 2> /dev/null)"
|
||||||
|
fi
|
||||||
if [[ -n "\$_hosts_processed" ]] ; then
|
if [[ -n "\$_hosts_processed" ]] ; then
|
||||||
certs_processed=true
|
certs_processed=true
|
||||||
fi
|
fi
|
||||||
@ -2128,15 +2134,25 @@ if [[ -n "\$_http_request_failed" ]] ; then
|
|||||||
echo "===================================================="
|
echo "===================================================="
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
for _hostname in \$__http_request_failed ; do
|
for _hostname in \$_http_request_failed ; do
|
||||||
echo " \$_hostname"
|
echo " \$_hostname"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "\$_too_many_certs_err_msg" ]] ; then
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Creating NEW Certificates failed - too many certificates already issued"
|
||||||
|
echo "========================================================================"
|
||||||
|
echo ""
|
||||||
|
echo -e "\$_too_many_certs_err_msg"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
if grep -i "error:" \$_logfile > /dev/null 2>&1 > /dev/null 2>&1; then
|
|
||||||
|
if grep -i "error:" \$_logfile > /dev/null 2>&1 || grep -i "$ERR_MSG_TOO_MANY_CERTS" \$_logfile > /dev/null 2>&1 ; then
|
||||||
|
|
||||||
cp -a \$_logfile /var/log/ > /dev/null 2>&1
|
cp -a \$_logfile /var/log/ > /dev/null 2>&1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user