From dfd4d0c10e90beaf733dfea7acacd7902b9a68df Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Fri, 7 Apr 2017 13:16:59 -0400 Subject: [PATCH] Document hook error handling (#4418) * Document hook error handling * Clarify wording around hook failure exit codes --- docs/using.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/using.rst b/docs/using.rst index 549a3479c..a325ff413 100644 --- a/docs/using.rst +++ b/docs/using.rst @@ -378,10 +378,16 @@ then restart it after the plugin is finished. Example:: certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start" -The hooks will only be -run if a certificate is due for renewal, so you can run this command -frequently without unnecessarily stopping your webserver. More -information about renewal hooks can be found by running +If a hook exits with a non-zero exit code, the error will be printed +to ``stderr`` but renewal will be attempted anyway. A failing hook +doesn't directly cause Certbot to exit with a non-zero exit code, but +since Certbot exits with a non-zero exit code when renewals fail, a +failed hook causing renewal failures will indirectly result in a +non-zero exit code. Hooks will only be run if a certificate is due for +renewal, so you can run the above command frequently without +unnecessarily stopping your webserver. + + More information about renewal hooks can be found by running ``certbot --help renew``. If you're sure that this command executes successfully without human