Add to Favourites Add to Favourites    Print this Article Print this Article

Creating default packages for new Resellers using the script

If you want to give new Resellers a base set of packages to start off with, you can create the script:

and inside it, add the code:

if [ "$usertype" = "reseller" ]; then
    cp -fp $DIR/$BASE/packages.list $DIR/$username/packages.list
    cp -fp $DIR/$BASE/packages/* $DIR/$username/packages
exit 0;

Where you can change the admin value to something else if you want to copy the default packages from some other Reseller on your system.   The above script will copy all User packages from the BASE account to all newly created Reseller accounts.  Remember to chmod the script to 755 so it's executable.

Was this answer helpful?

Also Read