ispCP - Board - Support
ispCP hooks - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: Suggestions (/forum-2.html)
+--- Thread: ispCP hooks (/thread-3409.html)



ispCP hooks - antencek - 05-30-2008 10:10 PM

Hello all!

Let me say ispCP is IMO the best opensource virtual hosting software.

I was sadly looking at old VHCS and then my life just got better with ispCP! :-) Please, keep up the good work!

On my Ubuntu 8.04 LTS 64bit ispCP is looking promising.
I have some suggestions based on my little experience, though some of them are already in wishlist.

Is it possible to implement hooks?
After adding a new domain user (subdomain...basically a new virtual host) I would need a nice hook, which could be set by administrator in /etc/ispcp/ispcp.conf to call a script.
The script could then make little changes to configuration files (like change WAN IP with LAN IP for the NATed networks in sites-enabled/ispcp.conf).

How to separate managing DNS records for a domain?
Like, delete/set different MX, add some CNAMEs for sites hosted somewhere else, disable DNS for a domain...

Will postgresql be manageble through ispCP one day (like MySQL)?


Tnx.

Have fun!

A


RE: ispCP hooks - kilburn - 06-01-2008 08:39 PM

Quote:Is it possible to implement hooks?

It is possible, but not implemented right now. I would suggest this approach:

1. Add a new table (id, event, user, hook) to the db
2. Implement the admin gui side, allowing to add records to it. Ex.:
(1, 'domain_added', 'root', '/hooks/my_hook.sh')
(2, 'email_added', 'amavis', '/hooks/my_other_hook.sh')
3. Gradually implement new hooks (in a consistent way), by modifying the engine parts that take those actions so they call the apropiate hooks.

While not "trivial" it should be easy to build such a system and we all would benefit from it. Maybe you want to try implementing it? Smile

Quote:How to separate managing DNS records for a domain?
There are a bunch of forum topics about this. The last one I remember is this one where vacancy says he's working on it. It will not make it to 1.0 though, sorry.

Quote:Will postgresql be manageble through ispCP one day (like MySQL)?
As managing postgresql can be done by the "frontend" alone, it should be realtively easy to implement. It seems that current developers don't use postgre so there's no active interest in implementing this feature, but we'll help as much as we can if you want to do it.


RE: ispCP hooks - antencek - 07-06-2008 05:36 PM

Hello.

Well, I did some changes to ispCP RC5 code to turn off/on DNS for the domain.
I also added use mail yes/no, so the postfix does [not] accept the mail for the domain.

I now don't know what to do with these changes. They sure don't do any more good only on my disk....anyone interested?


RE: ispCP hooks - kilburn - 07-06-2008 06:58 PM

It would be a good feature, so if you provide a patch (against current trunk would be better) we'll review it and try to get it mainstream so we all benefit from your work.

Do you know how to create the patch?


RE: ispCP hooks - antencek - 07-15-2008 03:15 AM

Hello,

sorry for my late reply.

Do you need just the diff of the files or should I use SVN?