Skip to content
Snippets Groups Projects

faster check if certificate exists

Merged Hahn Axel (hahn) requested to merge remove-sleep into master
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
+ 3
2
@@ -102,7 +102,8 @@ function _listCertdomains(){
# used in _certMustExist, _certMustNotExist
# param string FQDN
function _certExists(){
_listCertdomains | grep "^${CM_fqdn}$" >/dev/null
# _listCertdomains | grep "^${CM_fqdn}$" >/dev/null
$ACME --info -d "${CM_fqdn}" 2>/dev/null | grep "letsencrypt.org" >/dev/null
}
# internal function; a certificate of a given FQDN must exist - otherwise
@@ -284,7 +285,7 @@ function _getAliases(){
_sortWords $(
openssl x509 -noout -text -in ${CM_outfile_cert} \
| grep -E "(DNS:)" \
| sed "s#^\ *##g" \
| sed "s#^ *##g" \
| sed "s#DNS:##g" \
| sed "s#,##g"
)
Loading