Originally created by @adrian5 on GitHub (Dec 9, 2023).
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() and deploy_ocsp() to do any actual work.
Originally created by @adrian5 on GitHub (Dec 9, 2023).
I noticed that having only a subset of functions makes **dehydrated** error out. Do I take the [hook.sh](https://github.com/dehydrated-io/dehydrated/blob/master/docs/examples/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()` and `deploy_ocsp()` to do any actual work.
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";shiftif[["${HANDLER}"=~ ^(deploy_cert|deploy_ocsp)$ ]];then# Ignore all handler calls except the above"$HANDLER""$@"fi
?
@adrian5 commented on GitHub (Dec 10, 2023):
It just dawned on me that the handler function at the bottom isn't binding. Do I assume correctly that this is fine:
```bash
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.
@lukas2511 commented on GitHub (Dec 11, 2023):
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @adrian5 on GitHub (Dec 9, 2023).
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.@adrian5 commented on GitHub (Dec 10, 2023):
It just dawned on me that the handler function at the bottom isn't binding. Do I assume correctly that this is fine:
?
@lukas2511 commented on GitHub (Dec 11, 2023):
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.