Skip to content

Commit d59e14b

Browse files
committed
Disable debug output in hook shell script.
And improve the exit messages a bit. See #64
1 parent 1a0f332 commit d59e14b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/letsencrypt_hooks

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# adapter. This allows for setting the data on non-local storage so challenges
88
# and certs can work in a multi-server, load balanced environment.
99

10-
set -e -u -x
10+
set -e -u
1111

1212
function deploy_challenge {
1313
local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}"
@@ -17,7 +17,7 @@ function deploy_challenge {
1717
--data-urlencode "domain=$DOMAIN" \
1818
--data-urlencode "token_filename=$TOKEN_FILENAME" \
1919
--data-urlencode "token_value=$TOKEN_VALUE" \
20-
"http://127.0.0.1:$HOOK_SERVER_PORT/deploy-challenge"
20+
"http://127.0.0.1:$HOOK_SERVER_PORT/deploy-challenge" || { echo "hook request (deploy_challenge) failed" 1>&2; exit 1; }
2121
}
2222

2323
function clean_challenge {
@@ -28,7 +28,7 @@ function clean_challenge {
2828
--data-urlencode "domain=$DOMAIN" \
2929
--data-urlencode "token_filename=$TOKEN_FILENAME" \
3030
--data-urlencode "token_value=$TOKEN_VALUE" \
31-
"http://127.0.0.1:$HOOK_SERVER_PORT/clean-challenge" || { echo "hook request failed"; exit 1; }
31+
"http://127.0.0.1:$HOOK_SERVER_PORT/clean-challenge" || { echo "hook request (clean_challenge) failed" 1>&2; exit 1; }
3232
}
3333

3434
function deploy_cert {
@@ -40,7 +40,7 @@ function deploy_cert {
4040
--data-urlencode "privkey@$KEYFILE" \
4141
--data-urlencode "cert@$CERTFILE" \
4242
--data-urlencode "fullchain@$FULLCHAINFILE" \
43-
"http://127.0.0.1:$HOOK_SERVER_PORT/deploy-cert" || { echo "hook request failed"; exit 1; }
43+
"http://127.0.0.1:$HOOK_SERVER_PORT/deploy-cert" || { echo "hook request (deploy_cert) failed" 1>&2; exit 1; }
4444
}
4545

4646
function unchanged_cert {

0 commit comments

Comments
 (0)