Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    46

    Default script to run when account created

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by kbuser View Post
    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?
    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. #3
    cPanel Staff
    Join Date
    Aug 2007
    Posts
    25

    Default

    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
    Stephen Bee
    Quality Assurance

  4. #4
    Member
    Join Date
    Aug 2008
    Posts
    46

    Default

    thank you both.

  5. #5
    Member
    Join Date
    Feb 2006
    Location
    Jakarta
    Posts
    45

    Default

    Is there any script will run every time upgrade/downgrade packages ?

    I try to find in
    http://www.cpanel.net/support/docs/hooks.htm

    but not found any clue.

    Thanks

Similar Threads & Tags
Similar threads

  1. script to run after modifying an account
    By bmett in forum cPanel Developers
    Replies: 4
    Last Post: 02-25-2011, 08:26 PM
  2. Execute Script after a Mail Account or Forwarder is created
    By CoolMike in forum cPanel Developers
    Replies: 0
    Last Post: 07-16-2010, 02:43 AM
  3. how to get cpanel triggres external script when new account is created?
    By AL-Kateb in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-24-2010, 11:15 AM
  4. run script after domain is added/account created
    By izghitu in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-10-2007, 01:29 PM
  5. Ftp account created with a php script
    By lucasmd in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-23-2006, 05:20 PM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube