CVS: ispman/lib/ISPMan ApacheMan.pm,1.36,1.37

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs1:/tmp/cvs-serv11623

Modified Files:
	ApacheMan.pm 
Log Message:
added missing Logdir Statdir stuff


Index: ApacheMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ApacheMan.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** ApacheMan.pm	6 Jan 2004 21:26:51 -0000	1.36
--- ApacheMan.pm	6 Jan 2004 21:31:50 -0000	1.37
***************
*** 298,301 ****
--- 298,324 ----
     $data->{"DestinationAddress"} = $r->param("fileHost")  || $domain_info->{'ispmanDomainDefaultFileServer'};
  
+    ### STAT AN LOG DIR ###
+    ### Upgrade to make sure there is a value
+    if ($r->param("ispmanVhostLogdir") ne "") {
+      $data->{"ispmanVhostLogdir"} = $r->param("ispmanVhostLogdir");
+    } else {
+      if (lc($self->getConf('apacheLogsDirectory')) eq 'none') {
+        $data->{"ispmanVhostLogdir"} = join "/",($domain_info->{'homeDirectory'},"vhosts", $r->param("ispmanVhostName"), "logs");
+      } else {
+        $data->{"ispmanVhostLogdir"} = $r->param("ispmanVhostLogdir") || join "/", ($self->getConf('apacheLogsDirectory'), "vhosts");
+      }
+    }
+ 
+    ### Upgrade to make sure there is a value
+    if ($r->param("ispmanVhostStatdir") ne "") {
+      $data->{"ispmanVhostStatdir"} = $r->param("ispmanVhostStatdir");
+    } else {
+      if (lc($self->getConf('apacheLogsDirectory')) eq 'none') {
+        $data->{"ispmanVhostLogdir"} = join "/",($domain_info->{'homeDirectory'},"vhosts", $r->param("ispmanVhostName"), "stats");
+      } else {
+        $data->{"ispmanVhostStatdir"} = $r->param("ispmanVhostLogdir") || join "/", ($self->getConf('apacheLogsDirectory'),"domains", $data->{"ispmanDomain"}, $data->{"ispmanVhostName"});
+      }
+    }
+ 
  
     if ($data->{"webHost"}){
***************
*** 314,318 ****
                 $data->{"ispmanVhostScriptDir"}, 
                 $domain_info->{'uidNumber'}, 
!                $domain_info->{'gidNumber'}
                 )
              );
--- 337,343 ----
                 $data->{"ispmanVhostScriptDir"}, 
                 $domain_info->{'uidNumber'}, 
!                $domain_info->{'gidNumber'},
!                $data->{"ispmanVhostLogdir"},
!                $data->{"ispmanVhostStatdir"}
                 )
              );



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.