Closed adrian5 closed 9 months ago
It just dawned on me that the handler function at the bottom isn't binding. Do I assume correctly that this is fine:
deploy_cert() {
…
}
deploy_ocsp() {
…
}
HANDLER="$1"; shift
if [[ "${HANDLER}" =~ ^(deploy_cert|deploy_ocsp)$ ]]; then # Ignore all handler calls except the above
"$HANDLER" "$@"
fi
?
You only need to handle hook functions you really need. You can rewrite the hook script completely however you like it, it could also be written in another scripting language or even a compiled binary, the only thing that matters is that it can be run from the command line and accepts the hook function name as first parameter.
I noticed that having only a subset of functions makes dehydrated error out. Do I take the hook.sh example file as-is and only modify the function bodies I'm interested in, or what's the recommended approach?
I think I may only need
deploy_cert()
anddeploy_ocsp()
to do any actual work.