mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
changed cert acme status to a string to add 'unknown' status (when not diagnosed)
This commit is contained in:
parent
d848837bc6
commit
7b7c5f0b13
2 changed files with 8 additions and 4 deletions
|
@ -98,9 +98,13 @@ def certificate_status(domains, full=False):
|
||||||
if full:
|
if full:
|
||||||
try:
|
try:
|
||||||
_check_domain_is_ready_for_ACME(domain)
|
_check_domain_is_ready_for_ACME(domain)
|
||||||
status["ACME_eligible"] = True
|
status["acme_status"] = 'eligible'
|
||||||
except Exception:
|
except Exception as e:
|
||||||
status["ACME_eligible"] = False
|
if e.key == 'certmanager_domain_not_diagnosed_yet':
|
||||||
|
status["acme_status"] = 'unknown'
|
||||||
|
else:
|
||||||
|
status["acme_status"] = 'ineligible'
|
||||||
|
|
||||||
|
|
||||||
del status["domain"]
|
del status["domain"]
|
||||||
certificates[domain] = status
|
certificates[domain] = status
|
||||||
|
|
|
@ -192,7 +192,7 @@ def domain_info(domains):
|
||||||
"certificate": {
|
"certificate": {
|
||||||
"authority": certs[domain]["CA_type"]["code"],
|
"authority": certs[domain]["CA_type"]["code"],
|
||||||
"validity": certs[domain]["validity"],
|
"validity": certs[domain]["validity"],
|
||||||
"ACME_eligible": certs[domain]["ACME_eligible"],
|
"acme_status": certs[domain]["acme_status"],
|
||||||
},
|
},
|
||||||
"dns": get_dns_config(domain),
|
"dns": get_dns_config(domain),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue