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.

Tweaking the 'Create Account' process

Discussion in 'General Discussion' started by sceilig, May 30, 2005.

  1. sceilig

    sceilig Member

    Joined:
    Oct 1, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    A lot of my users want to have public access to their webstats, usually webalizer. I have come up with a way to do that by making a symbolic link to the webalizer folder, from a public folder.
    e.g. http://www.domain.com/webstats

    Right now I have a script which does this from the command line.

    --------------------------------------------------------------------------------
    ln -s /home/newuser/tmp/webalizer /home/newuser/www/webstats
    chown -R newuser.newuser /home/newuser/www/webstats
    chmod -R 0755 /home/newuser/tmp
    --------------------------------------------------------------------------------


    I would like to incorporate this into the "Create an Account" in cpanel. Is this possible? I figured it would involve editing the /scripts/wwwacct file, but I was unsure where to add my lines of code, and how exactly they should be added in a perl script (i dont have much perl experience). And perhaps this isnt possible in that maybe cpanel will overwrite my changes with a fresh copy of wwwacct when it does its next update?

    Thanks!
     
  2. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    Towards the end of wwwacct, we have provided two hooks for user defined scripts:
    Code:
    print "wwwacct creation finished\n";
    
    if (-e "/scripts/postwwwacct") {
       system("/scripts/postwwwacct",@ARGV);
    }
    if (-e "/scripts/postwwwacctuser") {
       system("/scripts/postwwwacctuser",$user);
    }
    
    
    exit;
    Just create your script in the appropriate location.
     

Share This Page