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!

IP change event

Discussion in 'cPanel Developers' started by NixTree, Jul 17, 2012.

  1. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    407
    Likes Received:
    3
    Trophy Points:
    143
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Is there any way to trigger a script when the IP change is changed for a domain? I have been cheking the hook fucntions and I don't see any such event that can invoke a script.

    Or am I missing something?

    What all I need is, when the IP of a domain is changed by admin - I need to run a script!

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelJared

    cPanelJared Technical Analyst

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    21
    Trophy Points:
    143
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Unfortunately, this is not going to be possible. The changeip_account function, which is what is called when you change an account's IP address, is compiled into scripts2 and is not an API call. In order to be able to make a hook, or even use the CustomEventHandler, there would need to be an API call for the function.

    The following page shows the hookable events:

    Hookable Events

    In:

    WHM Functions

    you can see that modifying an account is a hookable event, but not changing its IP address. Unfortunately, since changing an IP address is not done via an API call, at this time there is no way to trigger an action to happen based on it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice