Annotation of doc/loncapafiles/webserver.piml, revision 1.8

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

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