Skip to content
Snippets Groups Projects
Unverified Commit e7d36475 authored by Max Adamo's avatar Max Adamo
Browse files

minor

parent ea8a7eda
No related branches found
No related tags found
No related merge requests found
...@@ -20,13 +20,7 @@ from docopt import docopt ...@@ -20,13 +20,7 @@ from docopt import docopt
ARGS = docopt(__doc__) ARGS = docopt(__doc__)
PROVIDER = ARGS['--provider'] PROVIDER = ARGS['--provider']
if PROVIDER == "letsencrypt": if PROVIDER not in ["letsencrypt", "sectigo_ov", "sectigo_ev"]:
PROVIDER_STRING = 'LetsEncrypt'
elif PROVIDER == "sectigo_ov":
PROVIDER_STRING = 'SectiGO OV'
elif PROVIDER == "sectigo_ev":
PROVIDER_STRING = 'SectiGO EV'
else:
print("valid providers are: sectigo_ev, sectigo_ov and letsencrypt") print("valid providers are: sectigo_ev, sectigo_ov and letsencrypt")
sys.exit() sys.exit()
...@@ -41,7 +35,7 @@ JSON_FILE = "/etc/acme/{}.json".format(PROVIDER) ...@@ -41,7 +35,7 @@ JSON_FILE = "/etc/acme/{}.json".format(PROVIDER)
with open(YAML_FILE, "w") as yaml_out: with open(YAML_FILE, "w") as yaml_out:
yaml_out.write("{} Certificates:\n".format(PROVIDER_STRING)) yaml_out.write("---\n".format(PROVIDER_STRING))
for txt_line in DECODED_OUTPUT: for txt_line in DECODED_OUTPUT:
if "Certificate Name:" in txt_line: if "Certificate Name:" in txt_line:
txt_line_out = re.sub('.*Certificate Name: ', ' ', txt_line) + ":" txt_line_out = re.sub('.*Certificate Name: ', ' ', txt_line) + ":"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment