ispman-HEAD tasks cleanup
Atif Ghaffar <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
Short summary,
After some time, I have got the chance to work again on ISPMan.
I am helping Joerg to do the cleanup so the code is easier and the logic
is not everywhere.
2 main changes I did recently are.
1. params are passed by name to processes.
Until now we were passing a comma separated list of items and the
recieving function knew how to process it. This starts to get ugly... so
we change to name=value&name=value style as in GET URLs.
For example: here are the params passed to process createHomeDirectory
uid=xx_test_com&homeDirectory=/ispman/domains/test.com/users/xx_test_com&uidNumber=2279&gidNumber=2235
This way the function can recieve the parameters as a hashref and things
get easier....
2. All the processes were defined in ispman-agent. This started to get
hairy too, there was pieces of logic every where.
Now we have removed all the processing functions from ispman agent and
put them in a task directory.
In this directory you will find tasks that ISPMan writes to the
processtable. These tasks have almost no logic. They are just like a
batch script.
The task execute one or more commands with parameters. The commands can
be system commands such as rm, cp etc or ispman.* commands.
It gets easier to understand what happens behind a task.
please let me know your comments.
best regards
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt