Creating default packages for new Resellers using the user_create_post.sh script


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DirectAdmin

Creating default packages for new Resellers using the user_create_post.sh scriptLast Modified: Feb 4, 2008, 11:00 pm
If you want to give new Resellers a base set of packages to start off with, you can create the script:
/usr/local/directadmin/scripts/custom/user_create_post.sh

and inside it, add the code:

#!/bin/sh
BASE=admin
if [ "$usertype" = "reseller" ]; then
    DIR=/usr/local/directadmin/data/users
    cp -fp $DIR/$BASE/packages.list $DIR/$username/packages.list
    cp -fp $DIR/$BASE/packages/* $DIR/$username/packages
fi
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 user_create_post.sh script to 755 so it's executable.

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST