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

Some new hooks #14

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Some new hooks #14

wants to merge 16 commits into from

Conversation

loz-hurst
Copy link
Contributor

@loz-hurst loz-hurst commented Jan 21, 2021

Add hooks that selectively run other hooks based on the domain triggering the hook, interact with HP iLO out-of-band management to generate and upload certificates to them, and restart individual services.

Please do not merge until after #12 and #11 as this branch incorporates those fixes because they are required for:

  1. anything to work with the current version of dehydrated
  2. the iLO script to work (it requires one of the missing hook-points)

available/README.md Outdated Show resolved Hide resolved
available/README.md Outdated Show resolved Hide resolved
available/README.md Outdated Show resolved Hide resolved

Due to the restrictions of run-parts (only letters, numbers, dashes and underscores are permitted), domains in the filenames needs to have the periods replaced with dashes. For example, 'google.co.uk' would be 'google-co-uk' in the filename.

Use it by creating a symlink with the name `ifdomain_{domain}_{hook to run}`. The hook you want to run must exist in the same directory as the `ifdomain_` script your symlink points to. For example, `ifdomain_google-co-uk_reload_nginx` will call the `reload_nginx` hook if the domain is 'google.co.uk'. (Note that this means you need to create a symlink, in the same place as `ifdomain_` is, called `reload_nginx` pointing to `reload_`, if you want to use that).
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm reading this correctly, the symlink would need to be in the available directory, unless the user has rearranged things? Might be worth clarifying that, or perhaps list the necessary links for an example, like this:

deploy-cert/ifdomain_example-com_reload_nginx => ../available/ifdomain_
available/reload_nginx => reload_

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Firstly, thank you for the thorough review I appreciate your time and effort.

Please can you review the wording in 8b0c67c to see if that clarifies it? I added a simpler example and then the more complex chained-chain hook example, with the list of hook scripts and links as you suggested.

Hope that meets with your approval?

Thanks again,

Laurence

@loz-hurst
Copy link
Contributor Author

@pdw-mb this is ready for you to re-review, at your convenience.

available/reload_ Outdated Show resolved Hide resolved
@loz-hurst
Copy link
Contributor Author

loz-hurst commented Jul 22, 2022

Hi guys,

I've brought my fork up to date with current master. Can we re-review, I think I've addressed everything that was raised? (Still keen to get this merged :) )

Cheers,

Laurence

@loz-hurst loz-hurst requested review from TimStallard and pdw-mb July 22, 2022 10:26
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.

3 participants