Hello!
So, I have a few shell scripts like the one I've made and pasted here: Automatically manage certificates - #10 by Exterminador with the corresponding changes for each domain/subdomain, inside /etc/letsencrypt/renewal-hooks/deploy/
.
Unfortunately, every time I manually renew a certificate (for testing purposes) for a specific domain, it seems that all the scripts there are executed at the same time. I have some printf
lines in each script and I see them all being outputted after a renewal.
Example:
Renewing an existing certificate for znc.0bin.xyz
Hook 'deploy-hook' ran with output:
ZNC certificate and key renewed
Hook 'deploy-hook' ran with output:
PyLink certificate and key updated
Hook 'deploy-hook' ran with output:
SSLCertFile and SSLKeyFile updated successfully!
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/znc.0bin.xyz/fullchain.pem
Key is saved at: /etc/letsencrypt/live/znc.0bin.xyz/privkey.pem
This certificate expires on 2023-05-10.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for znc.0bin.xyz to /etc/apache2/sites-enabled/znc-le-ssl.conf
Your existing certificate has been successfully renewed, and the new certificate has been installed.
As you can see, only the lines with:
Hook 'deploy-hook' ran with output:
ZNC certificate and key renewed
should be displayed, but I still got the printf lines from all the other scripts.
I'm probably missing something on my scripts, but I really can't figure it out.
Any help/ideas are greatly appreciated.