File:  [LON-CAPA] / doc / loncapafiles / webserver.piml
Revision 1.3: download - view: text, annotated - select for diffs
Sat Feb 2 13:08:42 2002 UTC (22 years, 2 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
only append if line not currently present

    1: <!-- webserver.piml -->
    2: <!-- Scott Harrison -->
    3: 
    4: <!-- $Id: webserver.piml,v 1.3 2002/02/02 13:08:42 harris41 Exp $ -->
    5: 
    6: <!--
    7: 
    8: Copyright Michigan State University Board of Trustees
    9: 
   10: This file is part of the LearningOnline Network with CAPA (LON-CAPA).
   11: 
   12: LON-CAPA is free software; you can redistribute it and/or modify
   13: it under the terms of the GNU General Public License as published by
   14: the Free Software Foundation; either version 2 of the License, or
   15: (at your option) any later version.
   16: 
   17: LON-CAPA is distributed in the hope that it will be useful,
   18: but WITHOUT ANY WARRANTY; without even the implied warranty of
   19: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   20: GNU General Public License for more details.
   21: 
   22: You should have received a copy of the GNU General Public License
   23: along with LON-CAPA; if not, write to the Free Software
   24: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   25: 
   26: /home/httpd/html/adm/gpl.txt
   27: 
   28: http://www.lon-capa.org/
   29: 
   30: -->
   31: 
   32: <!-- Default values must be defined before specific values. -->
   33: <!-- If no 'dist' attribute is specified, then it is always installed. -->
   34: <!-- If 'dist' attribute is set to  'default', then the specification. -->
   35: <!-- is accepted if an alternative distribution is not requested or not -->
   36: <!-- defined. -->
   37: 
   38: <piml>
   39: <targetroot>/abc/</targetroot>
   40: <specialnotices>
   41: <specialnotice>
   42: </specialnotice>
   43: </specialnotices>
   44: <files>
   45: <file>
   46: <target dist='default'>/etc/httpd/conf/httpd.conf</target>
   47: <note>This is always expected for any version of Apache</note>
   48: <dependencies dist='default'>
   49: /etc/httpd/conf/httpd.conf
   50: </dependencies>
   51: <perlscript mode='fg'>
   52: unless (-e "<TARGET />") {
   53: 	print 'ERROR! httpd.conf should exist! Are you missing the Apache '.
   54: 		'software package';
   55: }
   56: else {
   57:   $flag=0;
   58:   open IN, "&lt;<TARGET />";
   59:   while (&lt;IN&gt;) { if (/^\s*Include\s+srm.conf/) { $flag=1; } }
   60:   close IN;
   61:   unless ($flag==0) {
   62: 	open OUT,"&gt;&gt;<TARGET />";
   63: 	print OUT 'Include srm.conf'."\n";
   64: 	close OUT;
   65:   }
   66:   $flag=0;
   67:   open IN, "&lt;<TARGET />";
   68:   while (&lt;IN&gt;) { if (/^\s*Include\s+access.conf/) { $flag=1; } }
   69:   close IN;
   70:   unless ($flag==0) {
   71: 	open OUT,"&gt;&gt;<TARGET />";
   72: 	print OUT 'Include access.conf'."\n";
   73: 	close OUT;
   74:   }
   75:   $flag=0;
   76:   my $eflag=0;
   77:   open IN, "&lt;<TARGET />";
   78:   while (&lt;IN&gt;) { 
   79:     if (/^\s*Include\s+loncapa.conf/) {
   80:       $flag=1; 
   81:     }
   82:   }
   83:   close IN;
   84:   unless ($flag==0) {
   85: 	open OUT,"&gt;&gt;<TARGET />";
   86: 	print OUT 'Include loncapa.conf'."\n";
   87: 	close OUT;
   88:   }
   89: }
   90: </perlscript>
   91: </file>
   92: <file>
   93: <target dist='default'>/etc/httpd/conf/access.conf</target>
   94: <note>This may or may not exist on a system depending on the version of
   95: Apache</note>
   96: <dependencies dist='default'>
   97: /etc/httpd/conf/access.conf
   98: </dependencies>
   99: <perlscript mode='fg'>
  100: unless (-e "<TARGET />") {
  101: 	print &lt;&lt;;
  102: WARNING! access.conf is not currently present on your system.
  103: This is either due to 
  104: * you are missing the Apache software package,
  105: * you have a newer version of Apache that does not
  106:   ordinarily install an access.conf
  107: * configuration files are installed in a directory location
  108:   different than for <TARGET />
  109: For backwards compatibility,
  110: <TARGET /> is being generated.
  111: END
  112: }
  113: my $flag=0;
  114: open IN, "&lt;<TARGET />";
  115: while (&lt;IN&gt;) { if (/^\s*Include\s+loncapa.conf/) { $flag=1; } }
  116: close IN;
  117: unless ($flag==0) {
  118: open OUT,"&gt;&gt;<TARGET />";
  119: print OUT 'Include loncapa.conf'."\n";
  120: close OUT;
  121: }
  122: </perlscript>
  123: </file>
  124: <file>
  125: <target dist='default'>/etc/httpd/conf/srm.conf</target>
  126: <note>This may or may not exist on a system depending on the version of
  127: Apache</note>
  128: <dependencies dist='default'>
  129: /etc/httpd/conf/srm.conf
  130: </dependencies>
  131: <perlscript mode='fg'>
  132: unless (-e "<TARGET />") {
  133: 	print &lt;&lt;;
  134: WARNING! srm.conf is not currently present on your system.
  135: This is either due to 
  136: * you are missing the Apache software package,
  137: * you have a newer version of Apache that does not
  138:   ordinarily install an srm.conf
  139: * configuration files are installed in a directory location
  140:   different than for <TARGET />
  141: For backwards compatibility,
  142: <TARGET /> is being generated.
  143: END
  144: }
  145: my $flag=0;
  146: open IN, "&lt;<TARGET />";
  147: while (&lt;IN&gt;) { if (/^\s*Include\s+loncapa.conf/) { $flag=1; } }
  148: close IN;
  149: unless ($flag==0) {
  150: open OUT,"&gt;&gt;<TARGET />";
  151: print OUT 'Include loncapa.conf'."\n";
  152: close OUT;
  153: }
  154: </perlscript>
  155: </file>
  156: </files>
  157: </piml>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>