Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exit_hook configuration option #10

Merged
merged 2 commits into from
Jun 12, 2017
Merged

Conversation

willyhun
Copy link

This is a simple addition to run a secondary script to distribute the new certificate files or restarts the configured services

pdns_api.sh Outdated

if [[ ! -z "${PDNS_EXIT_HOOK:-}" ]]; then
if [[ -x "${PDNS_EXIT_HOOK}" ]]; then
exec ${PDNS_EXIT_HOOK}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^-- SC2086: Double quote to prevent globbing and word splitting.

pdns_api.sh Outdated
# Interface for exit_hook
if [[ "${hook}" = "exit_hook" ]]; then
shift
exit_hook $@
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^-- SC2068: Double quote array expansions to avoid re-splitting elements.

pdns_api.sh Outdated
@@ -295,6 +295,19 @@ soa_edit() {
fi
}

exit_hook() {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the white space at the begin/end of the function.

pdns_api.sh Outdated
if [[ -x "${PDNS_EXIT_HOOK}" ]]; then
exec ${PDNS_EXIT_HOOK}
else
error "Your ${PDNS_EXIT_HOOK} not an executable"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this to: error "${PDNS_EXIT_HOOK} is not an executable"

@silkeh
Copy link
Owner

silkeh commented Jun 11, 2017

Thanks! I have added some (very minor) comments to take a look at.

Copy link
Author

@willyhun willyhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the corrections!

@willyhun willyhun closed this Jun 11, 2017
@willyhun
Copy link
Author

The suggestions implemented

@willyhun willyhun reopened this Jun 11, 2017
@silkeh silkeh merged commit b190d44 into silkeh:master Jun 12, 2017
@silkeh
Copy link
Owner

silkeh commented Jun 12, 2017

Merged! Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants