-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
pdns_api.sh
Outdated
|
||
if [[ ! -z "${PDNS_EXIT_HOOK:-}" ]]; then | ||
if [[ -x "${PDNS_EXIT_HOOK}" ]]; then | ||
exec ${PDNS_EXIT_HOOK} |
There was a problem hiding this comment.
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 $@ |
There was a problem hiding this comment.
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() { | |||
|
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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"
Thanks! I have added some (very minor) comments to take a look at. |
There was a problem hiding this 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!
The suggestions implemented |
Merged! Thanks again! |
This is a simple addition to run a secondary script to distribute the new certificate files or restarts the configured services