This has actually been updated elsewhere to use the newer HTTP AUTH which is much more simple. You nolonger need to start/stop apache to add domains.
Unfortunately certificates still need to be created manually. I made a module to work with the older method of certbot, but they changed something and it no longer works. I need to update it to use this newer method. The difficult problem is getting the daemon (more specifically the module's OnDaemonRun.hook.php) to execute the above command line actions. The module is basically done, it just needs a fresh set of eyes to find the error and add the revoke coding.
https://github.com/TGates71/sencrypt
If it can be made to run command line functions, the code can be stripped down to about 1/4 of what it is now.
Code:
create certificates:
sudo certbot certonly --webroot -w /var/sentora/hostdata/[client]/public_html/domain_com -d domain.com -d www.domain.com
update certificates after running the above with no errors:
sudo certbot renew
revoke a certificate:
sudo certbot revoke --cert-path /etc/letsencrypt/archive/domain.com/cert1.pem
it will ask if you want to delete the related certificates, select Y and hit enter.
https://github.com/TGates71/sencrypt
If it can be made to run command line functions, the code can be stripped down to about 1/4 of what it is now.