ispman/lib/ISPMan DomainMan.pm,1.87,1.88

Joerg Delker <[email protected]> Mon, 19 Feb 2007 00:22:12 +0000
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv29955/lib/ISPMan

Modified Files:
	DomainMan.pm 
Log Message:
implemented domain actions
(see feature request [ 1658512 ] Support "hosting packages")

Index: DomainMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/DomainMan.pm,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- DomainMan.pm	10 Feb 2007 20:50:21 -0000	1.87
+++ DomainMan.pm	19 Feb 2007 00:22:09 -0000	1.88
@@ -165,7 +165,7 @@
     my $self = shift;
     my $r    = shift;
 
-    # some comppliance modifications
+    # some compliance modifications
     my $domain = lc( $r->param("ispmanDomain") );
     $domain =~ s/\s//g;
     $r->param( "ispmanDomain", $domain );
@@ -247,34 +247,6 @@
         $self->addDataFromLdif( "templates/domain.$ou.ldif.template", $r );
     }
 
-    # create default a-record for mail
-    if (   $r->param("createArecordForMail")
-        && $r->param("ispmanDomainDefaultMailDropHost") )
-    {
-        $self->log_event( "createArecordForMail="
-              . $r->param("createArecordForMail")
-              . "\n" );
-
-        $self->newDNSRecord( $r->param("ispmanDomain"),
-            "aRecord", "mail",
-            $self->getHostIp( $r->param("ispmanDomainDefaultMailDropHost") ) );
-    }
-
-    # create default vhost for domain
-    if (   $r->param("createVhost")
-        && $r->param("ispmanDomainDefaultWebHost") )
-    {
-        $self->log_event( "createVhost=" . $r->param("createVhost") . "\n" );
-        my $q = new CGI(
-            {
-                'ispmanVhostName' => 'www',
-                'ispmanDomain'    => $domain,
-                'webHost'         => [ $r->param("ispmanDomainDefaultWebHost") ]
-            }
-        );
-        $self->addVhost($q);
-    }
-
     # add processes if this is a replica domain
     if ( $r->param("ispmanDomainType") eq "replica" ) {
 
@@ -333,6 +305,16 @@
     print $self->refreshSignal( $r->param("ispmanDomain") );
     print "Domain ", $r->param("ispmanDomain"), " was added\n";
 
+    # create process for domain actions
+    if ( $r->param("domainActions") ) {
+        for ($r->param("domainActions")) {
+            $self->addDomainFileServerProcess(
+                $r->param("ispmanDomain"),
+                "execDomainActions",
+                "script=$_");
+        }
+    }
+    
 }
 
 sub checkDomainType {


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV