certbot:error:argument –renew-hook:预期的一个参数

我正在通过Nginxencryption来更新证书。 我得到以下错误。 我错过了什么?

[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 

那么,错误信息是相当的解释:

certbot:error:argument –renew-hook:预期的一个参数

你已经使用了这个参数,但是你没有指定一个参数,在这个例子中是被调用的脚本。

引用文档 :

更新命令包括在更新证书之前或之后运行命令或脚本的钩子。 例如,如果您使用独立插件获取单个证书,则可能需要在续订之前停止Web服务器,以便独立可以绑定到必要的端口,然后在插件完成后重新启动它。

[…]

--pre-hook在每次更新尝试之前和之后, --pre-hook--post-hook hooks运行。 如果你希望你的钩子只有在成功更新之后才能运行, --renew-hook在这样的命令中使用--renew-hook

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

所以,如果你不需要额外的脚本,只需要省略这个参数。

这是由于certbot中的错误。 你需要修补它,如下面的URL所述。 这将在新版本中得到纠正。

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