ispman/tasks execDomainActions_task.pl,1.1,1.2

Joerg Delker <[email protected]> Sat, 03 Jan 2009 20:37:35 +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-serv28479/tasks

Modified Files:
	execDomainActions_task.pl 
Log Message:
extended script param to be not bound to tasks dir

Index: execDomainActions_task.pl
===================================================================
RCS file: /cvsroot/ispman/ispman/tasks/execDomainActions_task.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- execDomainActions_task.pl	19 Feb 2007 00:22:10 -0000	1.1
+++ execDomainActions_task.pl	3 Jan 2009 20:37:33 -0000	1.2
@@ -4,10 +4,18 @@
         print STDERR "Domain 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;
+    }
 
-    push @cmd, "$FindBin::Bin/../tasks/$params->{'script'} $params->{'domain'}";
+    push @cmd, "$script $params->{'domain'}";
 }


------------------------------------------------------------------------------