Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Run custom script upon successful autossl certificate installation

Discussion in 'cPanel Developers' started by EneTar, Nov 12, 2016.

Tags:
  1. EneTar

    EneTar Well-Known Member

    Joined:
    Dec 19, 2015
    Messages:
    71
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page