12-24-2011, 05:59 PM | #1 |
Junior Member
Join Date: Dec 2011
Posts: 3
|
Hook after user creation?
Hello,
is there any way how to hook a (shell) script to the ISPmanager in such a way that it would be called right after a user is created? I had no luck finding it. Actually I need the same for domain creation too. Any help is really appreciated. Thank you! |
12-25-2011, 12:34 AM | #2 |
ISPsystem team
Join Date: May 2008
Location: ISPsystem
Posts: 588
|
Hello, see
http://en.ispdoc.com/index.php/Perfo...tom_operations http://en.ispdoc.com/index.php/Events Use event for user.edit and domain.edit |
12-26-2011, 04:39 PM | #3 | |
Junior Member
Join Date: Dec 2011
Posts: 3
|
Quote:
However it seems that I am unable to get it working. What I have done (following the first link): Code:
# cat /usr/local/ispmgr/etc/ispmgr_mod_perms.xml <?xml version="1.0" encoding="UTF-8"?> <mgrdata> <handler name="perms_user.pl" type="cgi"> <event after="yes">user.edit</event> </handler> </mgrdata> Code:
# cat /usr/local/ispmgr/addon/perms_user.pl #!/usr/bin/perl use CGI; my $Q = new CGI; $func = $Q->param("func"); $elid = $Q->param("elid"); if ($func eq "user.edit") { if ($Q->param("sok") && $elid eq "") { # a user is created $name = $Q->param("name"); #system("/usr/local/sbin/setperms_user.sh $name"); } } print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<doc/>\n"; And permissions: Code:
-r-xr-x--- 1 root root 354 Dec 26 13:44 /usr/local/ispmgr/addon/perms_user.pl -rw-r--r-- 1 root root 158 Dec 26 13:33 /usr/local/ispmgr/etc/ispmgr_mod_perms.xml I'm working with ISPmanager-Pro 4.3.53.1. |
|
|
|