Programmatically renew SSL certificate

Studio VDS

New member
Joined
Dec 23, 2021
Messages
2
Hi,

Using the Direct Admin Api I'm adding domain pointers to my site programmatically. This works fine but these new domains don't get added to the SSL Certificate, for this to happen I need to renew the SSL certificate of my main domain. I can't find any documentation on how to do this? Is this the same as creating a new SSL certificate?

Can I just run:
PHP:
$sock->query('/CMD_API_SSL',
array(
    'domain' => $domain,
    'action' => 'save',
    'type' => 'create',
    'request' => 'letsencrypt',
    'name' => $domain,
    'keysize' => 'secp384r1',
    'encryption' => 'SHA256',
    'le_select0' => $domain,
    'le_select1' => 'www.'.$domain,
    'submit' => 'save'
)

Or do I need to do something else?
Thanks in advance
 
Doing a little more research I think I might need to use de letsencrypt plugin to do the renewal of the existing SSL certificate. I'm trying something like:

PHP:
$sock->query('/CMD_PLUGINS/letsencrypt/renew.html',
array(
'domain' => $domain
));

But this isn't working yet, but maybe one of you does know what to do next to make this work?
 
Back
Top