ispman/bin ispman.addvhost,1.9,1.10

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

Modified Files:
	ispman.addvhost 
Log Message:
added CLI suport for multiple webhosts


Index: ispman.addvhost
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.addvhost,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ispman.addvhost	8 Oct 2003 04:28:42 -0000	1.9
+++ ispman.addvhost	24 Jan 2004 17:18:29 -0000	1.10
@@ -7,7 +7,7 @@
    use Getopt::Std;
    getopt('dawp',  \%opts);
    unless ($opts{'d'} && $opts{'d'} && $ARGV[0]){
-      print "$0 -d domain -w webhost vhost [-a alias] [-p password]";
+      print "$0 -d domain vhost [-w webhost1, ... ,webhostn] [-a alias] [-p password]";
       print "\n";
       exit;
    }
@@ -29,9 +29,9 @@
 $r->param("userPassword", $opts{'p'})  if $opts{'p'};
 
 if  ($opts{'w'}){
-  $r->param("webHost", $opts{'w'});
-} elsif ($_webhost=$ispman->getDomainAttribute($opts{'d'}, "ispmanDomainDefaultWebHost")){
-  $r->param("webHost", $_webhost);
+  $r->param("webHost", split(",", $opts{'w'}));
+} elsif (@_webhost=$ispman->as_array($ispman->getDomainAttribute($opts{'d'}, "ispmanDomainDefaultWebHost"))){
+  $r->param("webHost", @_webhost);
 }elsif ($_webhost=$ispman->getHostGroupFirstMember('httpgroup')) {
   $r->param("webHost", $_webhost);
 } else {



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
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.