A scripts map would be great

interfasys

Verified User
Joined
Oct 31, 2003
Messages
1,821
Location
Switzerland
We've managed to categorize scripts (User, domain, IP, etc.), but we would love to have access to a scripts map that would let us know which scripts are called where.

Scripts could simply be added to this:
http://www.directadmin.com/skins.html

Something like:
HTM_PASSWD
------------------
user_password_change_post.sh
ftp_modfiy_pre.sh ???
ftp_modfiy_post.sh ???
database_change_post.sh ???

CMD_MODIFY_USER
------------------------
user_modify_pre.sh
user_modify_post.sh
ip_change_pre.sh
ip_change_post.sh
dns_write_pre.sh ???
dns_write_post.sh ???
 
Although it's not as pretty as your request, you can view all pre.sh scripts:
http://www.directadmin.com/search_versions.php?query=_pre.sh

all post.sh scripts:
http://www.directadmin.com/search_versions.php?query=_post.sh

For the most part, they should be fairly self-explanitory... however there are minor quirks with regards to exactly at which point in the specific command they're run (eg: domain_create_post.sh is called after the domain is created, but before domains/domain.com.conf is written)


In any case, the tree would end up having loops, since the bulk of the scripts are within their respective classes, and these classes are often called from many different locations. Eg, A restore creates an email account, and a client can also create an email account. Tracking the calls to classes in an inverse manner would prove to be somewhat time consuming, since each call happens many times, hence the document only mentions which generic action the scripts are called with, but not what triggers those actions. It's not impossible to do, but would take a decent chunk of time to complete.

As usual, I'm happy to answer any questions to specific tasks one is trying to accomplish, or specific scripts, etc...

John
 
..., and these classes are often called from many different locations.
That's exactly the problem :). Do we have to duplicate the code or will script "y" be called from page "z".

I would often find the name of a script encouraging, only to find out later that it would only apply in certain cases, called from certain blocks in certain pages.

As usual, I'm happy to answer any questions to specific tasks one is trying to accomplish, or specific scripts, etc...
I'll go into specifics in the scripting forum then when I'm trying to figure out something :)
 
Back
Top