I'm trying to test my deploy hook script (/etc/letsencrypt/renew-hooks/deploy/deploy.sh
) with a dry run of certbot renew
using the recent --run-deploy-hooks
option described in the Certbot 2.6.0 documentation:
--dry-run Perform a test run against the Let's Encrypt staging
server, obtaining test (invalid) certificates but not
saving them to disk. This can only be used with the
'certonly' and 'renew' subcommands. It may trigger
webserver reloads to temporarily modify & roll back
configuration files. --pre-hook and --post-hook
commands run by default. --deploy-hook commands do not
run, unless enabled by --run-deploy-hooks. The test
server may be overridden with --server. (default:
False)
--run-deploy-hooks When performing a test run using
--dry-run
or
reconfigure
, run any applicable deploy hooks. This
includes hooks set on the command line, saved in the
certificate's renewal configuration file, or present
in the renewal-hooks directory. To exclude directory
hooks, use --no-directory-hooks. The hook(s) will only
be run if the dry run succeeds, and will use the
current active certificate, not the temporary test
certificate acquired during the dry run. This flag is
recommended when modifying the deploy hook using
reconfigure
. (default: False)
$ certbot --version
certbot 2.6.0
$ certbot --help renew
--dry-run Perform a test run against the Let's Encrypt staging
server, obtaining test (invalid) certificates but not
saving them to disk. This can only be used with the
'certonly' and 'renew' subcommands. It may trigger
webserver reloads to temporarily modify & roll back
configuration files. --pre-hook and --post-hook
commands run by default. --deploy-hook commands do not
run, unless enabled by --run-deploy-hooks. The test
server may be overridden with --server. (default:
False)
--run-deploy-hooks When performing a test run using `--dry-run` or
`reconfigure`, run any applicable deploy hooks. This
includes hooks set on the command line, saved in the
certificate's renewal configuration file, or present
in the renewal-hooks directory. To exclude directory
hooks, use --no-directory-hooks. The hook(s) will only
be run if the dry run succeeds, and will use the
current active certificate, not the temporary test
certificate acquired during the dry run. This flag is
recommended when modifying the deploy hook using
`reconfigure`. (default: False)
Here is the command I use:
$ certbot --version
certbot 2.6.0
$ sudo certbot renew --dry-run --run-deploy-hooks
usage:
certbot [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: unrecognized arguments: --run-deploy-hooks
Am I using the --run-deploy-hooks
option incorrectly?