]> TLD Linux GIT Repositories - packages/dehydrated.git/blobdiff - hook.sh
- updated to 0.6.5
[packages/dehydrated.git] / hook.sh
diff --git a/hook.sh b/hook.sh
index 51c35b58d2e58c827bd2219d47dfae42ea275743..599cb7a1a7a7b456f12c70ada7139b30b1755f49 100755 (executable)
--- 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