We are deploying an Orthanc instance on fly.io with DICOM TLS and use letsencrypt with certbot to acquire and renew certificates. When the certificate is close to expiry and certbot issues a new certificate, I need a way to reload that into Orthanc.
Unfortunately, although Orthanc handles SIGHUP, it checks whether anything has changed by only considering the config file, not input referred there such as certificates. Still, certificate information seems to be cached during runtime. At least, removing the certificate from disk has not stopped TLS from working without a restart.
The current workaround is to kill the Orthanc process and have fly.io restart the machine but of course, this is affected by more downtime than necessary.
Would it be possible to extend handling SIGHUP such that it also restarts when TLS files change?
Or, do I need to add a fake configuration variable (e.g. serial number) and increment that to trigger a reload?
Any other ideas?