Skip to content

Commit

Permalink
Give both cron-included and non-cron-included users instructions on h…
Browse files Browse the repository at this point in the history
…ow to test using --dry-run (#718)

* Give both cron-included and non-cron-included users instructions on how to test using --dry-run

* Turn on certonly for haproxy

* Make the paragraph make sense if you're using haproxy
  • Loading branch information
ohemorange authored Jun 2, 2021
1 parent 4383bf4 commit 3065141
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 2 additions & 0 deletions _scripts/instruction-widget/get-started.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module.exports = function(context) {
context.officially = "officially ";
context.imperative = "you should probably"
template = "haproxy";
context.certonly = true;
context.haproxy = true;
}

plesk_getting_started = function() {
Expand Down
22 changes: 17 additions & 5 deletions _scripts/instruction-widget/templates/getting-started/renewal.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
<p>
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:
<pre>sudo {{base_command}} renew --dry-run</pre></p>
<p>
If that command completes without errors, your certificates will renew automatically in the background.
</p>
configuration.</p>

{{/cron_included}}
{{^cron_included}}
Expand All @@ -21,12 +17,22 @@
{{/cron_included}}

{{#certonly}}
{{#haproxy}}
<p>
Next, you'll want to add <code>pre</code> and <code>post</code> hooks to stop and start your
webserver automatically. Run the following commands to create the hook files in the appropriate
directory:
</p>
{{/haproxy}}
{{^haproxy}}
<p>
If you needed to stop your webserver to run Certbot, you'll want to
add <code>pre</code> and <code>post</code> 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:
</p>
{{/haproxy}}


<pre class="no-before"><ol><li>sudo sh -c 'printf "#!/bin/sh\nservice haproxy stop\n" > /etc/letsencrypt/renewal-hooks/pre/haproxy.sh'</li>
<li>sudo sh -c 'printf "#!/bin/sh\nservice haproxy start\n" > /etc/letsencrypt/renewal-hooks/post/haproxy.sh'</li>
Expand All @@ -40,6 +46,12 @@
</p>
{{/certonly}}

<p>You can test automatic renewal for your certificates by running this command:
<pre>sudo {{base_command}} renew --dry-run</pre></p>
<p>
If that command completes without errors, your certificates will renew automatically in the background.
</p>

</li>

<li>
Expand Down

0 comments on commit 3065141

Please sign in to comment.