Skip to content

Commit

Permalink
Update support for the dehydrated 0.4.0 'exit_hook()' function, inclu…
Browse files Browse the repository at this point in the history
…ding CentOS restarts
  • Loading branch information
whereisaaron committed Mar 14, 2017
1 parent dc305bb commit 570dd4c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*~
12 changes: 11 additions & 1 deletion centos6/hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,15 @@ function find_zone() {
return 1
}

#
# This hook is called at the end of a dehydrated command and can be used
# to do some final (cleanup or other) tasks.
#
exit_hook() {
:
}

HANDLER="$1"; shift
"$HANDLER" "$@"
if [[ "${HANDLER}" =~ ^(deploy_challenge|clean_challenge|deploy_cert|unchanged_cert|invalid_challenge|request_failure|exit_hook)$ ]]; then
"$HANDLER" "$@"
fi
8 changes: 6 additions & 2 deletions hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,12 @@ function find_zone() {
return 1
}

function exit_hook() {
exit 0
#
# This hook is called at the end of a dehydrated command and can be used
# to do some final (cleanup or other) tasks.
#
exit_hook() {
:
}

HANDLER="$1"; shift
Expand Down

0 comments on commit 570dd4c

Please sign in to comment.