Skip to main content

Mass Update Reseller Account Creation Limit

Comments

2 comments

  • Jcats
    You can use this, just replace plan1 plan2 plan3 with the plan names. Bash Script: #!/bin/bash for CPUSER in $(whmapi1 listresellers |grep - |grep [a-Z] | awk '{print $2}') ; do RSPLAN=$(grep PLAN= /var/cpanel/users/"${CPUSER}" | sed 's/PLAN=//g') if [ "${RSPLAN}" = plan1 ]; then PLANLIMIT=5 fi if [ "${RSPLAN}" = plan2 ]; then PLANLIMIT=10 fi if [ "${RSPLAN}" = plan3 ]; then PLANLIMIT=15 fi echo whmapi1 setresellerlimits user="${CPUSER}" enable_account_limit=1 account_limit="${PLANLIMIT}" done
    Its going to echo out the results so it will not actually change anything, this is just so you can ensure its going to set what you want properly, but your output should look something like whmapi1 setresellerlimits user=user1 enable_account_limit=1 account_limit=5 whmapi1 setresellerlimits user=user2 enable_account_limit=1 account_limit=10 whmapi1 setresellerlimits user=user3 enable_account_limit=1 account_limit=15
    If it looks good, then remove 'echo' from the last line so its just whmapi1 setresellerlimits user="${CPUSER}" enable_account_limit=1 account_limit="{$PLANLIMIT}"
    and it will set each reseller to the limit you set for each plan depending on which plan is set for the reseller its checking. You can also check:
    0
  • cPanelLauren
    Thanks @Jcats
    0

Please sign in to leave a comment.