]> TLD Linux GIT Repositories - packages/dehydrated.git/blob - hook.sh
- updated URLs
[packages/dehydrated.git] / hook.sh
1 #!/bin/bash
2
3 # This is main script for handling dehydrated hook scripts.
4 # Please do not edit this file! It will be overwritten by package updates!
5
6 # Directory with per certificate hook scripts called after
7 # certificate is successfully deployed
8 HOOKS_D="/etc/dehydrated/hooks.d"
9
10 # Load system fucntions
11 . "/etc/dehydrated/hooks/functions"
12 # Load custom fucntions
13 . "/etc/dehydrated/hooks/custom_functions"
14
15 HANDLER="${1}"
16 shift
17 case "${HANDLER}" in
18 deploy_cert)
19   deploy_cert "$@"
20   custom_deploy_cert "$@"
21   ;;
22 clean_challenge)
23   clean_challenge "$@"
24   custom_clean_challenge "$@"
25   ;;
26 deploy_challenge)
27   deploy_challenge "$@"
28   custom_deploy_challenge "$@"
29   ;;
30 invalid_challenge)
31   invalid_challenge "$@"
32   custom_invalid_challenge "$@"
33   ;;
34 request_failure)
35   request_failure "$@"
36   custom_request_failure "$@"
37   ;;
38 unchanged_cert)
39   unchanged_cert "$@"
40   custom_unchanged_cert "$@"
41   ;;
42 startup_hook)
43   startup_hook "$@"
44   custom_startup_hook "$@"
45   ;;
46 exit_hook)
47   exit_hook "$@"
48   custom_exit_hook "$@"
49   ;;
50 esac