Short version:
I have ACME certificates configured in my Proxmox. And everything is working perfectly.
Now, how can I run a custom script when the certificate is renewed?
Long version:
In PBS documentation, we learn that we can use:
to share ACME certificates between a PVE and a PBS installed on the same server. Nice!
Problem is, this same documentation also left an "exercise for the reader":
At the risk of appearing obtuse... How can I do this?
I have ACME certificates configured in my Proxmox. And everything is working perfectly.
Now, how can I run a custom script when the certificate is renewed?
Long version:
In PBS documentation, we learn that we can use:
Bash:
NODE=$(hostname)
cp /etc/pve/nodes/${NODE}/pveproxy-ssl.pem /etc/proxmox-backup/proxy.pem
cp /etc/pve/nodes/${NODE}/pveproxy-ssl.key /etc/proxmox-backup/proxy.key
chmod 640 /etc/proxmox-backup/proxy.key /etc/proxmox-backup/proxy.pem
chgrp backup /etc/proxmox-backup/proxy.key /etc/proxmox-backup/proxy.pem
systemctl reload proxmox-backup-proxy.service
Problem is, this same documentation also left an "exercise for the reader":
You only need to schedule the copying of the certificate and key after each renewal (e.g. by creating an appropriate cronjob or systemd-timer)
At the risk of appearing obtuse... How can I do this?