Преглед изворни кода

Update hook for new version of dehydrated

master
Chris Smith пре 4 година
родитељ
комит
fc9fa7f787
Signed by: Chris Smith <chris@chameth.com> GPG Key ID: 3A2D4BBDC4A3C9A9
1 измењених фајлова са 4 додато и 75 уклоњено
  1. 4
    75
      hook.sh

+ 4
- 75
hook.sh Прегледај датотеку

@@ -47,79 +47,8 @@ function clean_challenge {
47 47
     # The parameters are the same as for deploy_challenge.
48 48
 }
49 49
 
50
-function invalid_challenge() {
51
-    local DOMAIN="${1}" RESPONSE="${2}"
50
+HANDLER="$1"; shift
51
+if [[ "${HANDLER}" =~ ^(deploy_challenge|clean_challenge)$ ]]; then
52
+  "$HANDLER" "$@"
53
+fi
52 54
 
53
-    echo "invalid_challenge called: ${DOMAIN}, ${RESPONSE}"
54
-
55
-    # This hook is called if the challenge response has failed, so domain
56
-    # owners can be aware and act accordingly.
57
-    #
58
-    # Parameters:
59
-    # - DOMAIN
60
-    #   The primary domain name, i.e. the certificate common
61
-    #   name (CN).
62
-    # - RESPONSE
63
-    #   The response that the verification server returned
64
-}
65
-
66
-function deploy_cert {
67
-    local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}"
68
-
69
-    echo "deploy_cert called: ${DOMAIN}, ${KEYFILE}, ${CERTFILE}, ${FULLCHAINFILE}, ${CHAINFILE}"
70
-
71
-    # This hook is called once for each certificate that has been
72
-    # produced. Here you might, for instance, copy your new certificates
73
-    # to service-specific locations and reload the service.
74
-    #
75
-    # Parameters:
76
-    # - DOMAIN
77
-    #   The primary domain name, i.e. the certificate common
78
-    #   name (CN).
79
-    # - KEYFILE
80
-    #   The path of the file containing the private key.
81
-    # - CERTFILE
82
-    #   The path of the file containing the signed certificate.
83
-    # - FULLCHAINFILE
84
-    #   The path of the file containing the full certificate chain.
85
-    # - CHAINFILE
86
-    #   The path of the file containing the intermediate certificate(s).
87
-}
88
-
89
-function unchanged_cert {
90
-    local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}"
91
-
92
-    echo "unchanged_cert called: ${DOMAIN}, ${KEYFILE}, ${CERTFILE}, ${FULLCHAINFILE}, ${CHAINFILE}"
93
-
94
-    # This hook is called once for each certificate that is still
95
-    # valid and therefore wasn't reissued.
96
-    #
97
-    # Parameters:
98
-    # - DOMAIN
99
-    #   The primary domain name, i.e. the certificate common
100
-    #   name (CN).
101
-    # - KEYFILE
102
-    #   The path of the file containing the private key.
103
-    # - CERTFILE
104
-    #   The path of the file containing the signed certificate.
105
-    # - FULLCHAINFILE
106
-    #   The path of the file containing the full certificate chain.
107
-    # - CHAINFILE
108
-    #   The path of the file containing the intermediate certificate(s).
109
-}
110
-
111
-exit_hook() {
112
-  # This hook is called at the end of a dehydrated command and can be used
113
-  # to do some final (cleanup or other) tasks.
114
-
115
-  :
116
-}
117
-
118
-startup_hook() {
119
-  # This hook is called before the dehydrated command to do some initial tasks
120
-  # (e.g. starting a webserver).
121
-
122
-  :
123
-}
124
-
125
-HANDLER=$1; shift; $HANDLER "$@"

Loading…
Откажи
Сачувај