Run custom script upon successful autossl certificate installation

EneTar

Well-Known Member
Dec 19, 2015
157
12
68
Greece
cPanel Access Level
Root Administrator
Is there any way to run a /mytools/script.sh upon successful installation or renewal of an autossl (Comodo provider) certificate?

Any hook or callback that I could use and an example would be highly appreciated. In addition If there is way to get at the same time the domains (example: subdomain.mydomain.com) of the certificates which have just renewed or installed would be just perfect. My script interacts with the cPanel UAPI.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,236
463
Hello,

You could setup the custom script to automatically run after the AutoSSL certificate check script that runs as part of the following cron job:

Code:
/etc/cron.d/cpanel_autossl
However, I don't believe there's a specific API function available for what you are seeking. Feel free to open a feature request for this via:

Submit A Feature Request

You may also find the following documents helpful:

WHM API 1 Functions - get_autossl_check_schedule - Software Development Kit - cPanel Documentation
WHM API 1 Functions - get_autossl_log - Software Development Kit - cPanel Documentation
Guide to Third-Party AutoSSL Provider Modules - Software Development Kit - cPanel Documentation

Thank you.