]> TLD Linux GIT Repositories - packages/dehydrated.git/blob - hook.sh
- added support for custom functions
[packages/dehydrated.git] / hook.sh
1 #!/bin/bash
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 system fucntions
8 . "/etc/dehydrated/hooks/functions"
9 # Load custom fucntions
10 . "/etc/dehydrated/hooks/custom_functions"
11
12 HANDLER="${1}"
13 shift
14 case "${HANDLER}" in
15 deploy_cert)
16   deploy_cert "$@"
17   custom_deploy_cert "$@"
18   ;;
19 clean_challenge)
20   clean_challenge "$@"
21   custom_clean_challenge "$@"
22   ;;
23 deploy_challenge)
24   deploy_challenge "$@"
25   custom_deploy_challenge "$@"
26   ;;
27 invalid_challenge)
28   invalid_challenge "$@"
29   custom_invalid_challenge "$@"
30   ;;
31 request_failure)
32   request_failure "$@"
33   custom_request_failure "$@"
34   ;;
35 unchanged_cert)
36   unchanged_cert "$@"
37   custom_unchanged_cert "$@"
38   ;;
39 startup_hook)
40   startup_hook "$@"
41   custom_startup_hook "$@"
42   ;;
43 exit_hook)
44   exit_hook "$@"
45   custom_exit_hook "$@"
46   ;;
47 esac