Skip to content

Conversation

@InstabilSpielt
Copy link

@InstabilSpielt InstabilSpielt commented Jan 11, 2026

Problem

In the renew script, hooks (PRE_HOOK_CMD, POST_HOOK_CMD, DEPLOY_HOOK_CMD) are correctly handled as independent parameters. However, in the certonly script, these same hooks are nested inside the FORCE_RENEWAL conditional block.

When a user sets up a new certificate, the hooks are ignored unless they also set FORCE_RENEWAL=true.

Using CERTBOT_CERTONLY_FLAGS for hooks would be possible in theory, but:
It is currently subject to word splitting because the variable is not quoted when appended to the array: certbot_params+=($CERTBOT_CERTONLY_FLAGS). This breaks any hook command containing spaces.

Solution

This PR moves the hook parameters in the certonly script outside of the FORCE_RENEWAL block. The certonly script now behaves like the renew script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant