0

I am having an issue with renewing the certificate via let's encrypt on Nginx. I get below error. What am I missing?

[root] #  /usr/local/letsencrypt/certbot-auto renew --quiet --renew-hook --dry-run
usage: 
  certbot-auto [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...

Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. 
certbot: error: argument --renew-hook: expected one argument

2 Answers 2

2

Well, the error message is fairly explanatory:

certbot: error: argument --renew-hook: expected one argument

You've used the parameter, but you didn't specify an argument, in this case the script to be called.

Quoting the docs:

The renew command includes hooks for running commands or scripts before or after a certificate is renewed. For example, if you have a single certificate obtained using the standalone plugin, you might need to stop the webserver before renewing so standalone can bind to the necessary ports, and then restart it after the plugin is finished.

[...]

--pre-hook and --post-hook hooks run before and after every renewal attempt. If you want your hook to run only after a successful renewal, use --renew-hook in a command like this:

certbot renew --renew-hook /path/to/renew-hook-script

So, if you don't need an extra script, just omit this parameter.

-1

This is the due to the bug in certbot. You need to patch it as mentioned in below URL. This will be corrected in new version.

https://bugzilla.redhat.com/show_bug.cgi?id=1444814

1
  • 2
    Using a parameter wrongly is certainly no bug in the application Aug 13, 2017 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .