X-Git-Url: https://git.tld-linux.org/?p=packages%2Fdehydrated.git;a=blobdiff_plain;f=hook.sh;h=599cb7a1a7a7b456f12c70ada7139b30b1755f49;hp=283ed79671ed713418f255a4f522087164ab8724;hb=b5d5d321a92ef9a1ee59bc6ffebc3bb2d2f93454;hpb=79a156bc24e94996895437aa55e593ddb62a9d90 diff --git a/hook.sh b/hook.sh index 283ed79..599cb7a 100755 --- a/hook.sh +++ b/hook.sh @@ -1,37 +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 "$@" ;; exit_hook) exit_hook "$@" + custom_exit_hook "$@" ;; esac