Question about API

swood

New member
Joined
Nov 23, 2009
Messages
2
Question to all gathered.
As it is possible through API DA to create the files necessary to me in a folder of the user.
That is I would like, that in a folder/usr/local/directadmin/data/users / $ user/there was a file/usr/local/directadmin/data/users / $ user/file _ $ domains.conf
 
Hello,

You might be able to create specific files using the API if you use the Admin File Editor (AFE), but that would be somewhat annoying to use, because for each file you want to create, you'd first have to edit the "edit_files.txt" through the AFE and add your file to the list.. after authenticating as root, then you'd be able to use the AFE again to create your file.. it's not really designed for that.

However, if you're looking to create a file after the creation of a new User.. or after the creation of a new domain, then the post sh script would be far more useful to you. This url contains a short list of all the available post.sh scripts available:
http://www.directadmin.com/features.php?id=183

Take note of domain_create_post.sh and user_create_post.sh.

There is a larger list of available post.sh scripts here:
http://www.directadmin.com/search_versions.php?query=post.sh

John
 
Back
Top