mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Merge pull request #554 from letsencrypt/renew_before_deploy
Try to renew certs before trying to deploy them
This commit is contained in:
@@ -169,11 +169,6 @@ def main(config=None, args=sys.argv[1:]):
|
|||||||
# user about the existence of an invalid or corrupt renewal
|
# user about the existence of an invalid or corrupt renewal
|
||||||
# config rather than simply ignoring it.
|
# config rather than simply ignoring it.
|
||||||
continue
|
continue
|
||||||
if cert.should_autodeploy():
|
|
||||||
cert.update_all_links_to(cert.latest_common_version())
|
|
||||||
# TODO: restart web server (invoke IInstaller.restart() method)
|
|
||||||
notify.notify("Autodeployed a cert!!!", "root", "It worked!")
|
|
||||||
# TODO: explain what happened
|
|
||||||
if cert.should_autorenew():
|
if cert.should_autorenew():
|
||||||
# Note: not cert.current_version() because the basis for
|
# Note: not cert.current_version() because the basis for
|
||||||
# the renewal is the latest version, even if it hasn't been
|
# the renewal is the latest version, even if it hasn't been
|
||||||
@@ -182,3 +177,8 @@ def main(config=None, args=sys.argv[1:]):
|
|||||||
renew(cert, old_version)
|
renew(cert, old_version)
|
||||||
notify.notify("Autorenewed a cert!!!", "root", "It worked!")
|
notify.notify("Autorenewed a cert!!!", "root", "It worked!")
|
||||||
# TODO: explain what happened
|
# TODO: explain what happened
|
||||||
|
if cert.should_autodeploy():
|
||||||
|
cert.update_all_links_to(cert.latest_common_version())
|
||||||
|
# TODO: restart web server (invoke IInstaller.restart() method)
|
||||||
|
notify.notify("Autodeployed a cert!!!", "root", "It worked!")
|
||||||
|
# TODO: explain what happened
|
||||||
|
|||||||
@@ -51,5 +51,5 @@ for x in cert chain fullchain privkey;
|
|||||||
do
|
do
|
||||||
latest="$(ls -1t $dir/ | grep -e "^${x}" | head -n1)"
|
latest="$(ls -1t $dir/ | grep -e "^${x}" | head -n1)"
|
||||||
live="$(readlink -f "$root/conf/live/le.wtf/${x}.pem")"
|
live="$(readlink -f "$root/conf/live/le.wtf/${x}.pem")"
|
||||||
#[ "${dir}/${latest}" = "$live" ] # renewer fails this test
|
[ "${dir}/${latest}" = "$live" ]
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user