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.

script to run when account created

Discussion in 'General Discussion' started by kbuser, Feb 9, 2009.

  1. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    Hello.

    I'm looking to run a PERL script every time an account is created in WHM, hopefully with the account info passed to the script.

    Is this possible?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Yes, in fact all you need to do is create /scripts/postwwwacct as a shell script. That script is always executed after the creation of any account. You can create /scripts/prewwwacct if you want it to execute before an account is created.

    For more information about how the account information is passed to this script, please visit:

    http://www.cpanel.net/support/docs/hooks.htm
     
  3. cPanelStephen

    cPanelStephen Active Member
    Staff Member

    Joined:
    Aug 7, 2007
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    You can accomplish this by placing a script at /scripts/postwwwacct or /scripts/postwwwacctuser. Information on how to process the arguments for these scripts is documented at the following URL:

    http://www.cpanel.net/support/docs/hooks.htm
     
  4. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    thank you both.
     
  5. tata13

    tata13 Active Member

    Joined:
    Feb 8, 2006
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Jakarta
Loading...

Share This Page