X-Git-Url: https://git.tld-linux.org/?p=packages%2Fdehydrated.git;a=blobdiff_plain;f=hook.sh;h=599cb7a1a7a7b456f12c70ada7139b30b1755f49;hp=2025617099ab009a84a13bc84e2d1142ebfda837;hb=b5d5d321a92ef9a1ee59bc6ffebc3bb2d2f93454;hpb=99664be1df538e0d613685d223dde3e7cef8eda4 diff --git a/hook.sh b/hook.sh index 2025617..599cb7a 100755 --- a/hook.sh +++ b/hook.sh @@ -1,34 +1,50 @@ -#!/bin/sh +#!/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