ispman/tasks execVhostActions_task.pl,1.3,1.4
Joerg Delker <[email protected]> Sat, 03 Jan 2009 20:25:00 +0000
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/tasks
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26329/tasks
Modified Files:
execVhostActions_task.pl
Log Message:
removed obsolete domain param
extended script param to be not bound to tasks dir
Index: execVhostActions_task.pl
===================================================================
RCS file: /cvsroot/ispman/ispman/tasks/execVhostActions_task.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- execVhostActions_task.pl 3 Jan 2009 16:17:25 -0000 1.3
+++ execVhostActions_task.pl 3 Jan 2009 20:24:57 -0000 1.4
@@ -1,17 +1,20 @@
sub execVhostActions_task {
my $params = shift;
- unless ( $params->{'ispmanDomain'} ) {
- print STDERR "ispmanDomain not defined. Cannot continue\n";
- return 0;
- }
- unless ( $params->{'script'} ) {
+ my $script = $params->{'script'};
+ unless ( $script ) {
print STDERR "script not defined. Cannot continue\n";
return 0;
}
+ unless ($script =~ /^\//) {
+ $script = $ispman->getConf("installDir")."/tasks/".$script;
+ }
+ unless (-x $script) {
+ print STDERR "Script \"$script\" not executable!";
+ return 0;
+ }
# Pass script the FQHN of the vhost
# (adjust as appropriate)
- push @cmd, $ispman->getConf("installDir")."/tasks/".$params->{'script'}
- . " " . $params->{'cn'};
+ push @cmd, $script." ".$params->{'cn'};
}
------------------------------------------------------------------------------