mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
Split out runnable renewer into separate file
This commit is contained in:
parent
b13b6de79f
commit
cdf8ccbd34
2 changed files with 16 additions and 11 deletions
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""Renewer tool to handle autorenewal and autodeployment of renewed
|
||||
certs within lineages of successor certificates, according to
|
||||
configuration."""
|
||||
|
|
@ -452,12 +450,3 @@ def main(config=DEFAULTS):
|
|||
renew(cert, old_version)
|
||||
notify.notify("Autorenewed a cert!!!", "root", "It worked!")
|
||||
# TODO: explain what happened
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if ("renewer_enabled" in DEFAULTS
|
||||
and not DEFAULTS.as_bool("renewer_enabled")):
|
||||
print "Renewer is disabled by configuration! Exiting."
|
||||
raise SystemExit
|
||||
else:
|
||||
main()
|
||||
|
|
|
|||
16
letsencrypt/scripts/renewer.py
Executable file
16
letsencrypt/scripts/renewer.py
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from letsencrypt.client import renewer
|
||||
|
||||
DEFAULTS = configobj.ConfigObj("renewal.conf")
|
||||
DEFAULTS["renewal_configs_dir"] = "/tmp/etc/letsencrypt/configs"
|
||||
DEFAULTS["official_archive_dir"] = "/tmp/etc/letsencrypt/archive"
|
||||
DEFAULTS["live_dir"] = "/tmp/etc/letsencrypt/live"
|
||||
|
||||
if __name__ == 'main':
|
||||
if ("renewer_enabled" in DEFAULTS
|
||||
and not DEFAULTS.as_bool("renewer_enabled")):
|
||||
print "Renewer is disabled by configuration! Exiting."
|
||||
raise SystemExit
|
||||
else:
|
||||
renewer.main()
|
||||
Loading…
Reference in a new issue