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.

Multiple skeleton sites...

Discussion in 'General Discussion' started by Afro Boy, Jan 11, 2004.

  1. Afro Boy

    Afro Boy Member

    Joined:
    Oct 14, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Was wondering if anyone out there knew how to create multiple skeleton sites\directories?

    I would like some of my packages to come 'pre-installed' with particular programs and scripts for the user (eg. blog software, etc.)

    Any ideas on how I can achieve this?

    Thanks,
    Af.
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Each reseller gets their own skel directory. Just create a few resellers for yourself, using fake domains if you want, and each one can be customized as you wish.
     
  3. Afro Boy

    Afro Boy Member

    Joined:
    Oct 14, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thought so! ;-)

    Thanks. If anyone else has any ideas, then that'll be great. I'll give the above one a shot.

    Cheers,
    Af.
     
  4. alex042

    alex042 Well-Known Member

    Joined:
    Sep 13, 2003
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    How would a skeleton directory work to create a dynamic site like a blog site anyway? This would require a database with a unique name based on the account.
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Having different skel directories per plan would not be that hard though to do. Best that cPanel does via a feature, but, by editing /scripts/wwwacct you could do something similar (not exact) like so...

    if ($plan eq "Plan1") {

    if (-e "$skhomedir/cpanel3-skel" && $uhomedir ne "" && -d $uhomedir) {
    print "Copying skel files from $skhomedir/cpanel3-skel/ to $uhomedir/\n";

    if ($system =~ /freebsd/i) {
    print "Using Freebsd Copy\n";
    system("cp -Rpfv $skhomedir/cpanel3-skel/.[a-z]* $uhomedir/ 2>/dev/null");
    system("cp -Rpfv $skhomedir/cpanel3-skel/* $uhomedir/ 2>/dev/null");
    } else {
    system("cp -af $skhomedir/cpanel3-skel/.[a-z]* $uhomedir/ 2>/dev/null");
    system("cp -af $skhomedir/cpanel3-skel/* $uhomedir/ 2>/dev/null");
    }
    }

    elseif ($plan eq "Plan2") {

    do this skel .......


    etc......

    Get the idea?
     
  6. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    This is really interesting as I've been wanting to do this.

    Has anybody successfully implemented this manually? If so, may I kindly have a look at a sample code for a few plans please? Does this script get overwritten with each CPanel update?

    Is CPanel thinking of implementing this? I find the Skeleton Directory feature to be severely limited by its inability to set up custom skeleton directories depending on variables such as Package Type.

    Thanks.
     
  7. LuckDragon

    LuckDragon Member

    Joined:
    Jun 6, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    does anyone know the code that I would need to add to automatically create a db with an account type? using the modified code posted here, I'm able to do the multiple skel directories.. but I have a custom written script that I give to my clients with 1 of the packages that I have and would like to have it automatically install the script (create the db)..

    I can have the cpanel script run an external php script to create the tables, and the configuration file needed for my script.. but I'm not sure how to have it create the db per cpanel's parameters.

    thank you in advance.
     
Loading...

Share This Page