Add hook to be called at the end #170

Closed
opened 2025-12-29 00:26:26 +01:00 by adam · 2 comments
Owner

Originally created by @rossnick on GitHub (Dec 5, 2016).

Add a possibily to the hook script to be called at the end of all processing when any deploy_cert has been called.

That would be usefull for instance to restart/reload the apache/other webserver config only once, instead of at each time a cert is deployed when there are many certs to deploy.

Originally created by @rossnick on GitHub (Dec 5, 2016). Add a possibily to the hook script to be called at the end of all processing when any deploy_cert has been called. That would be usefull for instance to restart/reload the apache/other webserver config only once, instead of at each time a cert is deployed when there are many certs to deploy.
adam closed this issue 2025-12-29 00:26:26 +01:00
Author
Owner

@CRCinAU commented on GitHub (Dec 27, 2016):

I'm not sure this is required.... You could implement this with a normal hook, say, create a file called cert-deployed.txt and add your domains to it within the HOOK. If this file changes, run something else - ie:

#!/bin/bash
if [ -f deployed_domains.txt ]; then
    rm -f deployed_domains.txt
fi
dehydrated -c
if [ -f deployed_domains.txt ]; then
    systemctl reload httpd
fi

Then in your normal HOOK file, touch the 'deployed_domains.txt' file within the deploy_cert stage.

@CRCinAU commented on GitHub (Dec 27, 2016): I'm not sure this is required.... You could implement this with a normal hook, say, create a file called cert-deployed.txt and add your domains to it within the HOOK. If this file changes, run something else - ie: ``` #!/bin/bash if [ -f deployed_domains.txt ]; then rm -f deployed_domains.txt fi dehydrated -c if [ -f deployed_domains.txt ]; then systemctl reload httpd fi ``` Then in your normal HOOK file, touch the 'deployed_domains.txt' file within the deploy_cert stage.
Author
Owner

@lukas2511 commented on GitHub (Jan 29, 2017):

This is a duplicate of #148, which I just closed.
See https://github.com/lukas2511/dehydrated/pull/148#issuecomment-275918581

Summary: Do more or less what @CRCinAU said, I just added a new hook to make this work without an actual wrapper script (298a7e9aaf).

@lukas2511 commented on GitHub (Jan 29, 2017): This is a duplicate of #148, which I just closed. See https://github.com/lukas2511/dehydrated/pull/148#issuecomment-275918581 Summary: Do more or less what @CRCinAU said, I just added a new hook to make this work without an actual wrapper script (298a7e9aafaa0b05c3f6ab6ca6538661f6b5feb8).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#170