From cfff843823bc9357e09a720d631ceed85bd05e06 Mon Sep 17 00:00:00 2001
From: Erica Portnoy
Date: Fri, 28 May 2021 13:15:37 -0700
Subject: [PATCH 1/3] Give both cron-included and non-cron-included users
instructions on how to test using --dry-run
---
.../templates/getting-started/renewal.html | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/_scripts/instruction-widget/templates/getting-started/renewal.html b/_scripts/instruction-widget/templates/getting-started/renewal.html
index 351a2cbe6..68cea87ed 100644
--- a/_scripts/instruction-widget/templates/getting-started/renewal.html
+++ b/_scripts/instruction-widget/templates/getting-started/renewal.html
@@ -4,11 +4,7 @@
The Certbot packages on your system come with a cron job or systemd timer that will renew your certificates
automatically before they expire. You will not need to run Certbot again, unless you change your
- configuration. You can test automatic renewal for your certificates by running this command:
-
sudo {{base_command}} renew --dry-run
-
- If that command completes without errors, your certificates will renew automatically in the background.
-
+ configuration.
{{/cron_included}}
{{^cron_included}}
@@ -40,6 +36,12 @@
{{/certonly}}
+ You can test automatic renewal for your certificates by running this command:
+
sudo {{base_command}} renew --dry-run
+
+ If that command completes without errors, your certificates will renew automatically in the background.
+
+
From 0e7ef3f2006ff2c1d5e12c67381f61fd1b61623d Mon Sep 17 00:00:00 2001
From: Erica Portnoy
Date: Tue, 1 Jun 2021 10:07:14 -0700
Subject: [PATCH 2/3] Turn on certonly for haproxy
---
_scripts/instruction-widget/get-started.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/_scripts/instruction-widget/get-started.js b/_scripts/instruction-widget/get-started.js
index 83add210a..f155225b9 100644
--- a/_scripts/instruction-widget/get-started.js
+++ b/_scripts/instruction-widget/get-started.js
@@ -43,6 +43,7 @@ module.exports = function(context) {
context.officially = "officially ";
context.imperative = "you should probably"
template = "haproxy";
+ context.certonly = true;
}
plesk_getting_started = function() {
From aaef3674976a9ec5d240f76c114e3b3960b0fdb5 Mon Sep 17 00:00:00 2001
From: Erica Portnoy
Date: Tue, 1 Jun 2021 16:12:25 -0700
Subject: [PATCH 3/3] Make the paragraph make sense if you're using haproxy
---
_scripts/instruction-widget/get-started.js | 1 +
.../templates/getting-started/renewal.html | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/_scripts/instruction-widget/get-started.js b/_scripts/instruction-widget/get-started.js
index f155225b9..8b2dee14b 100644
--- a/_scripts/instruction-widget/get-started.js
+++ b/_scripts/instruction-widget/get-started.js
@@ -44,6 +44,7 @@ module.exports = function(context) {
context.imperative = "you should probably"
template = "haproxy";
context.certonly = true;
+ context.haproxy = true;
}
plesk_getting_started = function() {
diff --git a/_scripts/instruction-widget/templates/getting-started/renewal.html b/_scripts/instruction-widget/templates/getting-started/renewal.html
index 68cea87ed..d97388a46 100644
--- a/_scripts/instruction-widget/templates/getting-started/renewal.html
+++ b/_scripts/instruction-widget/templates/getting-started/renewal.html
@@ -17,12 +17,22 @@
{{/cron_included}}
{{#certonly}}
+ {{#haproxy}}
+
+ Next, you'll want to add pre
and post
hooks to stop and start your
+ webserver automatically. Run the following commands to create the hook files in the appropriate
+ directory:
+
+ {{/haproxy}}
+ {{^haproxy}}
If you needed to stop your webserver to run Certbot, you'll want to
add pre
and post
hooks to stop and start your webserver automatically.
For example, if your webserver is HAProxy, run the following commands to create the hook files
in the appropriate directory:
+ {{/haproxy}}
+
- sudo sh -c 'printf "#!/bin/sh\nservice haproxy stop\n" > /etc/letsencrypt/renewal-hooks/pre/haproxy.sh'
- sudo sh -c 'printf "#!/bin/sh\nservice haproxy start\n" > /etc/letsencrypt/renewal-hooks/post/haproxy.sh'