CVS: ispman/bin ispman.addvhost,1.7,1.8

Atif Ghaffar <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv13671

Modified Files:
	ispman.addvhost 
Log Message:
adding logic to select a webhost if one is not provided. look in domain and then select first from the group or exit

Index: ispman.addvhost
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.addvhost,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** ispman.addvhost	1 Aug 2003 15:30:03 -0000	1.7
--- ispman.addvhost	8 Oct 2003 04:26:13 -0000	1.8
***************
*** 28,32 ****
  $r->param("ispmanVhostServerAlias", $opts{'a'})  if $opts{'a'};
  $r->param("userPassword", $opts{'p'})  if $opts{'p'};
! $r->param("webHost", $opts{'w'})  if $opts{'w'};
  ### Added by Justin Hallett from a patch from Ciran
  ### Might want to add options for these, but this fixes
--- 28,45 ----
  $r->param("ispmanVhostServerAlias", $opts{'a'})  if $opts{'a'};
  $r->param("userPassword", $opts{'p'})  if $opts{'p'};
! 
! if  ($opts{'w'}){
!     $r->param("webHost", $opts{'w'});
! } elsif ($_webhost=$ispman->getDomainAttribute($opts{'d'}, "ispmanDomainDefaultWebHost")){
!            # see if there is a ispmanDomainDefaultWebHost defined
!            # for this domain
!            $r->param("webHost", $_webhost);
! }elsif ($_webhost=$ispman->getHostGroupFirstMember('httpgroup')) {
!       $r->param("webHost", $_webhost);
! } else
!       print "No host in webserver is the group found. \nYou cannot add vhosts untill you define some hosts in the httpgroup\n";
!       exit;
! }
! 
  ### Added by Justin Hallett from a patch from Ciran
  ### Might want to add options for these, but this fixes
***************
*** 37,41 ****
  $r->param("ispmanVhostScriptDirOption", ["ExecCGI", "FollowSymLinks"]);
  $r->param("FTPStatus", "enabled");
! $r->param("FTPQuotaMBytes", "25"); 
  
  $ispman->addVhost($r);
--- 50,54 ----
  $r->param("ispmanVhostScriptDirOption", ["ExecCGI", "FollowSymLinks"]);
  $r->param("FTPStatus", "enabled");
! $r->param("FTPQuotaMBytes", "25");
  
  $ispman->addVhost($r);



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
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.