Domain pointer count against domain count

ostendo

Verified User
Joined
Dec 6, 2006
Messages
64
Hi all,

I'd like to suggest a new feature for DirectAdmin.
If I give a customer a package with 3 domains, I do not really care how he uses the domains. It doesn't matter for me (just for his own disk space) whether he adds content to all three or that he points two of them to the third one.

For me, it would be very convenient if I could disable the limit on domain pointers and just add all regular domains and domain pointers and have a limit for the sum of the both of them.

What do you think?
 
There should already be a limit for that when you setup the user.
 
Go to :

list users -> select a user -> modify user

and you will see an input box for addon domains
 
Go to :

list users -> select a user -> modify user

and you will see an input box for addon domains

Yeah, but that's exactly what I do NOT mean. I don't want to make the choice between regular domains and domain pointers, I want the user to have that choice, but within my limits.

So I want to be able to give a user 5 domains. And that can be 1 regular domain and 4 domain pointers, 5 regular domains, 3 regular domains and 1 pointer etc... I don't care. But I do want to put a limit to the total number of domains..
 
It can be easily now done with the help of PRE scripts:

domain_pointer_create_pre.sh
domain_create_pre.sh
 
Sure.

STEP 1: Count total usage (work with /usr/local/directadmin/data/users/<username>/user.usage).

vdomains + domainptr = total_usage


STEP 2: Get max allowed (work with /usr/local/directadmin/data/users/<username>/user.usage):

domainptr = vdomains = max_allowed

domainptr must be equal with vdomains (edit your packages) as user can create only regular domains or one domain with pointers.

STEP 3: Compare max_allowed with total_usage.
Here you can print out your own message if over limit.

STEP 4: Exit

exit 0 - that's OK, user is within limits. Directadmin will continue creation of pointer/domain.

exit 1 - that's an errror, user is getting over limits. Directadmin will abort creation of pointer/domain.
 
Hmmmmm you're right, that's a solution! Even though I still think it could/should be a feature of DA itself, this will help me out here for now. Thanks!
 
Back
Top