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.

IP change event

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

  1. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    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.
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    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.
     
Loading...

Share This Page