X-Git-Url: https://git.tld-linux.org/?p=packages%2Fdehydrated.git;a=blobdiff_plain;f=hook.sh;h=599cb7a1a7a7b456f12c70ada7139b30b1755f49;hp=51c35b58d2e58c827bd2219d47dfae42ea275743;hb=b5d5d321a92ef9a1ee59bc6ffebc3bb2d2f93454;hpb=e44fc66b805fb82e1eeac00fd778d02f214464c7 diff --git a/hook.sh b/hook.sh index 51c35b5..599cb7a 100755 --- a/hook.sh +++ b/hook.sh @@ -1,34 +1,50 @@ #!/bin/bash +# This is main script for handling dehydrated hook scripts. +# Please do not edit this file! It will be overwritten by package updates! + # Directory with per certificate hook scripts called after # certificate is successfully deployed HOOKS_D="/etc/dehydrated/hooks.d" -# Load fucntions +# Load system fucntions . "/etc/dehydrated/hooks/functions" +# Load custom fucntions +. "/etc/dehydrated/hooks/custom_functions" HANDLER="${1}" shift case "${HANDLER}" in deploy_cert) deploy_cert "$@" + custom_deploy_cert "$@" ;; clean_challenge) clean_challenge "$@" + custom_clean_challenge "$@" ;; deploy_challenge) deploy_challenge "$@" + custom_deploy_challenge "$@" ;; invalid_challenge) invalid_challenge "$@" + custom_invalid_challenge "$@" ;; request_failure) request_failure "$@" + custom_request_failure "$@" ;; unchanged_cert) unchanged_cert "$@" + custom_unchanged_cert "$@" + ;; +startup_hook) + startup_hook "$@" + custom_startup_hook "$@" ;; -*) - echo " + Hook: ${HANDLER}: Nothing to do..." +exit_hook) + exit_hook "$@" + custom_exit_hook "$@" ;; esac