Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    8

    Default Run script on Domain/Sub-domain creation.

    I am using my own mod_fcgid build with a wrapper so I can execute php scripts on a per-user basis and add a custom phpini if needed.

    Now, since it uses a wrapper on a per-user basis, I need to have a file in the public_html directory in order for it to run properly.

    So how can I run a script when a new domain or sub-domain is created? I tried searching the forum without luck, anyone have experience with doing this?

    (The script I'm going to run is just going to copy the wrapper to the new public_html directory and chown/chmod it to the correct permissions)

    Thanks in advance!

  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

    If this is going to be on a per-user basis rather than a per-domain/subdomain basis, you can insert your hook code into /scripts/postwwwacct

    Details on how to do this are available at: http://www.cpanel.net/support/docs/hooks.htm

    If you wish to have a hook for any domain/sub-domain creation, you may wish to refer to this document on how to set up hooks for these functions:

    /usr/local/cpanel/hooks/README

  3. #3
    Member
    Join Date
    Oct 2003
    Posts
    147

    Default

    The same question how to do that hook?

    When user add subdomain or addon domain we must put file to the new domain (subdomain) folder. php.ini for that domain...

Similar Threads & Tags
Similar threads

  1. Run command each time domain is added
    By someB0dy in forum cPanel Developers
    Replies: 1
    Last Post: 05-24-2010, 04:44 AM
  2. Modify Addon Domain Creation Script
    By g-force in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-29-2009, 12:19 PM
  3. 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
  4. [Help] Domain Creation
    By Phill43210 in forum New User Questions
    Replies: 1
    Last Post: 05-22-2006, 11:45 AM
  5. Script for sub-domain creation
    By 1rebelhost in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-05-2004, 09:29 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube