httpd-win32-msi-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-win32-msi InstallConf.awk
Date Wed, 14 Nov 2001 06:07:34 GMT
wrowe       01/11/13 22:07:34

  Modified:    .        InstallConf.awk
  Log:
    Handle the @@Port@@, and ssl-std.conf if it existed
  
  Revision  Changes    Path
  1.2       +40 -1     httpd-win32-msi/InstallConf.awk
  
  Index: InstallConf.awk
  ===================================================================
  RCS file: /home/cvs/httpd-win32-msi/InstallConf.awk,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InstallConf.awk	2001/08/18 18:31:56	1.1
  +++ InstallConf.awk	2001/11/14 06:07:34	1.2
  @@ -15,8 +15,10 @@
       domainname = ARGV[1];
       servername = ARGV[2];
       serveradmin = ARGV[3];
  -    serverroot = ARGV[4];
  +    serverport = ARGV[4];
  +    serverroot = ARGV[5];
   
  +    delete ARGV[5];
       delete ARGV[4];
       delete ARGV[3];
       delete ARGV[2];
  @@ -31,6 +33,7 @@
       print " DomainName =  " domainname >tstfl;
       print " ServerName =  " servername >tstfl;
       print " ServerAdmin = " serveradmin >tstfl;
  +    print " ServerPort =  " serverport >tstfl;
       print " ServerRoot =  " serverroot >tstfl;
   
       srcfl = confroot "httpd-win.conf";
  @@ -40,6 +43,7 @@
           gsub( /@@DomainName@@/, domainname );
           gsub( /@@ServerName@@/, servername );
           gsub( /@@ServerAdmin@@/, serveradmin );
  +        gsub( /@@Port@@/, serverport );
           print $0 > dstfl;
       }
       close(dstfl);
  @@ -53,8 +57,43 @@
           print "Successfully removed " srcfl > tstfl;
       }
   
  +    srcfl = confroot "ssl-std.conf";
  +    dstfl = confroot "ssl.default.conf";
  +    while ( ( getline < srcfl ) > 0 ) {
  +        gsub( /@@ServerRoot@@/, serverroot );
  +        gsub( /@@DomainName@@/, domainname );
  +        gsub( /@@ServerName@@/, servername );
  +        gsub( /@@ServerAdmin@@/, serveradmin );
  +        gsub( /@@Port@@/, serverport );
  +        print $0 > dstfl;
  +    }
  +    if ( close(dstfl) >= 0 ) {
  +        close(srcfl);
  +        print "Rewrote " srcfl "\n to " dstfl > tstfl;
  +
  +        gsub(/\//, "\\", srcfl);
  +        if (system("del \"" srcfl "\"")) {
  +            print "Failed to remove " srcfl > tstfl;
  +        } else {
  +            print "Successfully removed " srcfl > tstfl;
  +        }
  +    }
  +
       srcfl = confroot "httpd.default.conf";
       dstfl = confroot "httpd.conf";
  +    if ( ( getline < dstfl ) < 0 ) {
  +	while ( ( getline < srcfl ) > 0 ) {
  +	    print $0 > dstfl;
  +    	}
  +        close(srcfl);
  +        print "Duplicated " srcfl "\n to " dstfl > tstfl;
  +    } else {
  +        print "Existing file " dstfl " preserved" > tstfl;
  +    }
  +    close(dstfl);
  +
  +    srcfl = confroot "ssl.default.conf";
  +    dstfl = confroot "ssl.conf";
       if ( ( getline < dstfl ) < 0 ) {
   	while ( ( getline < srcfl ) > 0 ) {
   	    print $0 > dstfl;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: win32-msi-cvs-unsubscribe@httpd.apache.org
For additional commands, e-mail: win32-msi-cvs-help@httpd.apache.org


Mime
View raw message