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

feat: add hook-timeout to run and renew commands #2389

Merged
merged 3 commits into from
Jan 3, 2025
Merged

Conversation

bossm8
Copy link
Contributor

@bossm8 bossm8 commented Jan 3, 2025

Add the option --run-hook-timeout and --renewal-hook-timeout which lets you configure how long lego should wait for the hook to finish. The default of 120 seconds may be too short in some cases.

Background:

We have a setup in which we run lego periodically with a systemd service/timer combo.
When we execute the run/renewal hook we have multiple tasks which we would execute with the hook script, those tasks may in some cases exceed the 120s timeout. The option added in this PR lets us configure this timeout and successfully finish all tasks with the script.

Signed-off-by: Boss Marco <bossm8@hotmail.com>
@ldez ldez added the area/cli label Jan 3, 2025
@ldez ldez self-requested a review January 3, 2025 13:15
ldez added 2 commits January 3, 2025 14:28
@ldez ldez added this to the unreleased milestone Jan 3, 2025
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

Thank you 👍

Thank you for adding your use case, this is appreciated ❤️

I changed the type to use a duration: the syntax is more accurate because the need is more related to minutes (ex: 3m) than seconds (ex: 180).

Note: when you create a PR, it is better to use a dedicated branch instead of the main branch of the fork.

@ldez ldez enabled auto-merge (squash) January 3, 2025 13:36
@ldez ldez merged commit b83c1d5 into go-acme:master Jan 3, 2025
7 checks passed
@ldez ldez modified the milestone: unreleased Jan 6, 2025
@ldez ldez modified the milestones: unreleased, v4.22 Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants