custom scripts and stopping site creation

Jeff_Infopop

Verified User
Joined
Jan 23, 2004
Messages
12
We have multiple DirectAdmin machines and each one is tied into the same two named servers.

I am trying to implement a check in the domain_create_pre.sh and domain_change_pre.sh custom scripts that will cause a site create or domain change to stop and display an appropriate error message when the domain being created already exists in our DNS.

I tried having the script exit with error code 1. For a new accout Direct Admin still creates the account and then just notes that there was an error with the custom script when it is finished. For the domain change it won't change the domain but it still gives the generic error with custom script message.

Is there a way to stop the creation process and return some custom error text from these scripts?

Thanks.
 
strange, default directadmin will not allow account creation if the domain exists in bind. I am actually trying to get the opposite to work :) to have DA not need to add a domain record.
 
This is true when you have one direct admin machine, but when you have multiple direct admin machines that all add entries to the same DNS servers there is no built in check to determine if that domain already exists on one of the other servers.
 
Hello,

You'd want to do the check in user_create_pre.sh. The domain creation is just a small chunk of the User creation. Returning non-zero on the domain_create_pre.sh will only prevent the domain from being created in the larger process of the User being created.

John
 
Back
Top