hooks

  1. G

    Is it possible to trigger hooks when running /scripts/restorepkg?

    For example, I have hooks on my server that run when a domain or subdomain is added. If the domain gets created during restorepkg, these hooks don't run. Is there any way to have said hooks run?
  2. 000

    WHM »Home »Development »Manage Hooks (we can ADD/CREATE NEW hoooks ?)

    hello, are the HOOKS native from each OS? or is a tool from cPanel? how we can ADD hooks? why/when we must disable a HOOK?
  3. syslint

    How to retrun value from custom hooks cpanel uapi module

    Hello, I need help with a resturn value of custom hook module. The module code is as follows, sub foo { my ( $args, $result, $response ) = @_; my ( $arg1, $arg2 ) = $args->get( 'arg1', 'arg2' ); my $feature = 'cfoo_foo'; if ( !main::hasfeature($feature) ) {...
  4. M

    DNS Zone Hook

    I simply need to be able to run a command when a dns zone is deleted. Pretty basic. Any suggestions on how I can make this happen?
  5. jmginer

    Hook action when a dns zone has been changed

    Hi! I would like to run an action when a DNS zone has been modified. I haven't found anything in the hooks documentation. What would be the best way to develop it? If there is no hook, I had thought of registering the "SOA Serial Number" of all zones in a table and using cron to verify when...
  6. D

    Standardized hook - Retrieve PostURL

    Hi All, I have a need to trigger post events to the iContact PostURL (WHM -> Basic WebHost Manager Setup -> Contact Information -> URLs of a system to which you want to send POST notifications) via a standardized hook. As the contact manager does not have this capability, I've written a...
  7. O

    Create Subdomain and install wordpress via API?

    Hello guys, i have new Reseller, i need to create sub-Domian and install Wordpress automatically so how can i do this via code the documentation not clear at all. thanks in advance.
  8. sozotech

    Auto-install WordPress & staging upon account creation

    I know this has been asked before in a slightly different manner. We want to create a WordPress optimized hosting plan. We're using ModulesGarden WordPress Manager which relies on Softaculous to install WP and manage some functions like backups, restores, cloning, staging etc. My question is...
  9. M

    SOLVED Can't locate Cpanel/Logger.pm

    Hi All, I've created a hook.pm that automates some of the things I do after I create a cPanel account. It compiled and registered without issue. However, when I create an account, none of the actions are completed. So I need to trace through my code to see whats going on. I tried to add the...
  10. K

    Intercept and modify data with hook

    cPanel provides action hooks to trigger functions for cPanel events. As far as I understand, the data the system passes to the hook is essentially read-only as the hook has no way to modify values and return them to the system. I'm looking for filter hook functionality akin to wordpress filter...
  11. R

    Looking for a better way to track forwards

    I have implemented a script that uses a standardized hook (UAPI::Email::add_forwarder) to track certain details relating to the addition of a forwarder to an email account. This is working fine, but I have come across one limitation - the data passed to my methods by the hook does not include...
  12. M

    Email Encryption API

    Hi there, I am creating a hook that automates some of my tasks after cPanel account creation. I have everything accounted for except email encryption. I was not able to find it in uapi, api2, or api1. Is this feature not available via api? Encryption - Version 78 Documentation - cPanel...
  13. E

    Alert on forwarders' changed

    Hi As a root level user, is there a way to set up an alert whenever any domains forwarders are changed. The reason I ask for this is that some hackers are setting forwarders on users' account, watching their emails and then asking their clients to pay to the hackers' accounts instead of the...
  14. B

    hookable event of addon domain creation?

    Dear All .... Is there any Hookable event that trigered when addon domain created ? whosmgr only talk about 'parked domain' Sincerely -bino-
  15. jimlongo

    Remove a Hook manually

    given that I've been developing for a while this module, and there are hooks that are no longer relevant and weren't removed properly at the time, I'd like to clean up the hooks registry manually. Given that I have this [root@whm1 ~]# /usr/local/cpanel/bin/manage_hooks list Whostmgr...
  16. cPanelResources

    Tutorial How To Automatically Install WordPress On New Accounts

    Updated December 2020 These instructions have changed with the introduction of Wordpress Toolkit. You can find additional details in our support article here: https://support.cpanel.net/hc/en-us/articles/360037044993-How-To-Automatically-Install-WordPress-On-New-Accounts-Updated-for-WP-Toolkit-
  17. cPanelResources

    Tutorial How to Setup Standardized Hooks with BASH in cPanel & WHM

    Introduction This guide is for cPanel users who have root access on their cPanel server and would like to add custom functionality to cPanel and/or WHM using the BASH scripting language. It is important to keep in mind that this guide only covers the installation of a basic script. This is...
  18. P

    Install WordPress after account creation?

    Hi, I wonder if anyone could point me in the right direction, please? I'd like to have WHM automatically install WordPress (using WordPress manager) immediately after creating a new account. Is this possible, and if so - how might I go about it? Thanks in advance, Phil. :)
  19. S

    UAPI send passwords in a hashed format

    Hi, I am working on creating several Hooks to automate some tasks that need to be performed everytime a new account is added including: creating a database, creating a database user, and granting permissions to that user. Unfortunately I have reached a problem with the creation of the database...
  20. D

    Access data passed from cPanel in a custom hook?

    Hi, I am starting to write some hooks instead of running shell scripts to further automation, but am having some trouble starting out. I can make and register my hook, but I cannot run it using variables, I have to hard code everything which defeats the purpose. Specifically I am starting...