]> TLD Linux GIT Repositories - packages/dehydrated.git/blob - hook.sh
- moved hook processing code to functions
[packages/dehydrated.git] / hook.sh
1 #!/bin/sh
2
3 # Directory with per certificate hook scripts called after
4 # certificate is successfully deployed
5 HOOKS_D="/etc/dehydrated/hooks.d"
6
7 # Load fucntions
8 . "/etc/dehydrated/hooks/functions"
9
10 HANDLER="${1}"
11 shift
12 case "${HANDLER}" in
13 deploy_cert)
14   deploy_cert "$@"
15   ;;
16 clean_challenge)
17   clean_challenge "$@"
18   ;;
19 deploy_challenge)
20   deploy_challenge "$@"
21   ;;
22 invalid_challenge)
23   invalid_challenge "$@"
24   ;;
25 request_failure)
26   request_failure "$@"
27   ;;
28 unchanged_cert)
29   unchanged_cert "$@"
30   ;;
31 *)
32   echo " + Hook: ${HANDLER}: Nothing to do..."
33   ;;
34 esac