I edited the post_hook setting in the configuration file placed in /etc/letsencrypt/renewal/ using vi, but when renewal was executed, the previous setting was reactivated, and the post_hook setting in the configuration file reverted as well. I would like to know the correct method for modifying this configuration file.
My domain is:
I ran this command:
I edited the post_hook setting in the configuration file using vi,
then renewal was executed, the previous setting was reactivated, and the post_hook setting in the configuration file reverted as well.
My web server is (include version):
nginx version: nginx/1.20.1
The operating system my web server runs on is (include version):
Linux
I can login to a root shell on my machine :
yes
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 1.11.0
certbot reconfigure --cert-name "example.com" [options you want]
but your certbot version might be too old to have that command. I would upgrade certbot (that might mean using snap), or another alternative is to force a renewal with the options you want.
I've resolved the issue below, so I'm sharing the report.
The originally modified configuration file was this:
/etc/letsencrypt/renewal/$domain_name.conf
Even though the renewal was executed, the modified post_hook setting was not activated, and it reverted to the original setting. However, it was necessary to modify this configuration file:
/etc/sysconfig/certbot
The renewal execution was using systemd's timer, but the execution option was utilizing the post_hook option defined in /etc/sysconfig/certbot.
Everyone, thank you very much. Thanks to the hints I received, I was able to resolve the issue.