certbot.hooks
¶
Facilities for implementing hooks that call shell commands.
-
certbot.hooks.
_prog
(shell_cmd)[source]¶ Extract the program run by a shell command.
Parameters: shell_cmd (str) – command to be executed Returns: basename of command or None if the command isn’t found Return type: str or None
-
certbot.hooks.
validate_hook
(shell_cmd, hook_name)[source]¶ Check that a command provided as a hook is plausibly executable.
Raises: errors.HookCommandNotFound – if the command is not found
-
certbot.hooks.
post_hook
(config)[source]¶ Run post hook if defined.
If the verb is renew, we might have more certs to renew, so we wait until run_saved_post_hooks() is called.
-
certbot.hooks.
run_saved_post_hooks
()[source]¶ Run any post hooks that were saved up in the course of the ‘renew’ verb
-
certbot.hooks.
deploy_hook
(config, domains, lineage_path)[source]¶ Run post-issuance hook if defined.
Parameters: - config (configuration.NamespaceConfig) – Certbot settings
- domains (
list
ofstr
) – domains in the obtained certificate - lineage_path (str) – live directory path for the new cert