Several renew_hook lines in renewal conf?


#1

Good day,

I was wondering how to run several hooks after certificate renewal. Currently I have this line in my renewal conf file:

renew_hook = service nginx reload

And it works fine during a dry-run.

However, I’d also like to run another script for the same domain name. But adding another line like

renew_hook = /path/to/script.sh

leads to a broken conf file and refusal of a dry-run.

If I understand it correctly, I could just put the script in the renewal-hooks/post/ folder, and it should be run after every certificate renewal. However, if I had several domains requiring certificates, that would run this script for all of them. I would however only want to run it for a specific one.

Kind regards,
J


#2

Hi @sicHiRsch,

Use this:

renew_hook = "service nginx reload ; /path/to/script.sh"

Cheers,
sahsanu


#3

Thank you. That works.


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.