{"id":49697,"date":"2018-06-21T13:00:00","date_gmt":"2018-06-21T18:00:00","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=49697"},"modified":"2018-06-21T13:00:00","modified_gmt":"2018-06-21T18:00:00","slug":"new-ssl-standard-hooks-for-cpanel-whm-integrators","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/tips-and-tricks\/new-ssl-standard-hooks-for-cpanel-whm-integrators\/","title":{"rendered":"New SSL Standard Hooks for cPanel & WHM Integrators!"},"content":{"rendered":"
Hello, all you lovely people out in third-party developerland!<\/p>\n
Don’t you hate it when you’re installing an SSL certificate through a script or API calls, but there’s some action that you want to take before or after the installation? Well, thanks to the hardworking folks on the Development Team,\u00a0cPanel & WHM Version<\/a>\u00a0now includes a Standardized Hook for the SSL Installation event.<\/p>\n Standardized Hooks<\/a>\u00a0are our way to help developers trigger events when cPanel & WHM performs a specific action. Developers use the Standard Hooks system to execute custom code (hook action code) to customize how cPanel & WHM reacts in specific scenarios (hookable events<\/a>). For example, you could use this system to make certain that a script runs each time a cPanel account is created or terminated.<\/p>\n With the new hooks, you can automatically run code before and after the installation process. For example, if you want to touch a file\u00a0\u00a0What is a Standard Hook?<\/h2>\n
Take advantage of the new SSL Hooks<\/h2>\n
\/var\/cpanel\/hooks_test_log_post<\/code>\u00a0whenever an SSL is installed you would create the\u00a0
\/usr\/local\/cpanel\/3rdparty\/bin\/t<\/a>echhookpost.pm<\/code>\u00a0script hook with\u00a0the following code\u00a0\u00a0(provided in\u00a0Perl<\/a>):<\/p>\n