Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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