Give us some CLI that can work same as before, like : da --letsencrypt server_cert dd.hostname.com
I think the best way to accomplish this is to stop thinking of Let's Encrypt as a certificate issuance and certificate installer all in one.
Let's Encrypt is just a certificate authority.
You can use the acme.sh script to request a Let's Encrypt certificate from their certificate authority for any domain. You just have to be able to handle the DCV to prove that you "own" that domain.
Once the certificate is issued - you have the certificate, private key, and required CA Bundle - you can use the DirectAdmin API to install the certificate on the domain.
Then as far as doing all of this automatically, you just run a check to find all of the certificates on your server, determining if the domain attached to that certificate still resolves to your server, and then repeating the first step - issuing a request for a Let's Encrypt certificate for that domain.
I think too often we get caught up in finding a tool that does everything and then finding that it doesn't have the granular control that is desired.
Break the process into manageable pieces:
1) A way to pass a domain (or domains if you want the certificate to have SANs) to Let's Encrypt (or any CA) and request a secure certificate. (acme.sh can do this)
2) A way to install that certificate for that domain - the DirectAdmin API is handy here (especially
/usr/local/directadmin/directadmin api-url)
3) A way to check all of the certificates on a server and determine when a certificate needs to be renewed (when it's at 20 days left? 10 days left? 5 days left?) - This you kind of have to write yourself, but gives you control of how you want it to run.
There's actually very little that requires DirectAdmin for this. You just need the DirectAdmin API to install the certificate.
But once you have this framework - and since it's not built solely on a DirectAdmin requirement - you can deploy this on any type of web hosting server or control panel. Just replace the installation part.