mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
Different hooks for different operations #208
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pv2b on GitHub (Mar 30, 2017).
Currently the HOOK variable is used like this (from the default config file)
IMO this does not make much sense because, in the case of DNS-01 challenges, challenge deployment is completely unrelated to certificate deployment.
A useful feature would therefore be to be able to specify different hooks for different operations, for example HOOK_DEPLOY_CERT would be called for deploy_cert operations. If HOOK_DEPLOY_CERT were unset, HOOK would be called instead, thereby preserving backwards compatibility. Of course the other operations would get their own environment variables as well.
This is more of a "nice to have" though, because it's pretty trivial to work around this limitation by making a hook that simply "routes" the right hook calls to the right script.
@lukas2511 commented on GitHub (Jul 10, 2017):
Just use a master-script that distributes the hooks to other scripts, no need to implement this in dehydrated.