go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
7.89k stars 1.01k forks source link

Add hook for script before requesting a new certificate #848

Open vsund opened 5 years ago

vsund commented 5 years ago

I'm using acme-dns as provider for DNS challenges and I'd like to start it when it's needed and stop it when it's not needed anymore (and additionally copying over certificates and restarting services).

For this various hooks would be great :) A few days ago there was a PR merged which adds a post hook. Are there any plans to add a pre hook too? (which e.g. would be executed when a certificate will get renewed)

metanovii commented 5 years ago

I join in ! And send some args to scripts via --hook , for eg domain name, date renew certificate and other.

hari-govind commented 2 years ago

I recently migrated from certbot and found this feature(--pre-hook) missing in lego. I can attempt a pull request for this.

tengzl33t commented 11 months ago

Will it be added someday? Would be nice to get something similar to this: https://eff-certbot.readthedocs.io/en/stable/using.html#pre-and-post-validation-hooks