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

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.10      harris41    6: <!-- $Id: webserver.piml,v 1.9 2002/05/12 19:02:18 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'>
1.11    ! harris41   54: # Generated from doc/loncapafiles/webserver.piml
1.1       harris41   55: unless (-e "<TARGET />") {
1.11    ! harris41   56:   print 'ERROR! httpd.conf should exist! Are you missing the Apache '.
        !            57:     'software package';
        !            58:   exit(1);
1.1       harris41   59: }
                     60: else {
1.3       harris41   61:   $flag=0;
                     62:   open IN, "&lt;<TARGET />";
1.4       harris41   63:   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/srm.conf/) { $flag=1; } }
1.3       harris41   64:   close IN;
1.11    ! harris41   65:   if ($flag!=1 and -e '/etc/httpd/conf/srm.conf') {
        !            66:     open OUT,"&gt;&gt;<TARGET />";
        !            67:     print OUT 'Include conf/srm.conf'."\n";
        !            68:     close OUT;
1.3       harris41   69:   }
                     70:   $flag=0;
                     71:   open IN, "&lt;<TARGET />";
1.4       harris41   72:   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/access.conf/) { $flag=1; } }
1.3       harris41   73:   close IN;
1.11    ! harris41   74:   if ($flag!=1 and -e '/etc/httpd/conf/access.conf') {
        !            75:     open(OUT,'&gt;&gt;<TARGET />');
        !            76:     print(OUT 'Include conf/access.conf'."\n");
        !            77:     close(OUT);
1.3       harris41   78:   }
1.9       harris41   79:   my $eflag=0;
                     80:   $flag=0;
1.11    ! harris41   81:   open(IN,'&lt;<TARGET />');
1.9       harris41   82:   while (&lt;IN&gt;) { 
                     83:     if (/^\s*Include\s+conf\/loncapa_apache.conf/) {
                     84:       $flag=1; 
                     85:     }
                     86:   }
1.11    ! harris41   87:   close(IN);
1.9       harris41   88:   unless ($flag==1) {
1.11    ! harris41   89:     open(OUT,'&gt;&gt;<TARGET />');
        !            90:     print(OUT 'Include conf/loncapa_apache.conf'."\n");
        !            91:     close(OUT);
1.9       harris41   92:   }
1.3       harris41   93:   $flag=0;
1.11    ! harris41   94:   open(IN,'&lt;<TARGET />');
        !            95:   while (&lt;IN&gt;) {
1.4       harris41   96:     if (/^\s*Include\s+conf\/loncapa.conf/) {
1.11    ! harris41   97:       $flag=1;
1.3       harris41   98:     }
                     99:   }
1.11    ! harris41  100:   close(IN);
        !           101:   $in='';
        !           102:   if ($flag==1) {
        !           103:     open(IN,'&lt;<TARGET />');
        !           104:     while(&lt;IN&gt;) {
        !           105:       $in.=$_ unless /^\s*Include\s+conf\/loncapa.conf/;
        !           106:     }
        !           107:     close(IN);
        !           108:     open(OUT,'&gt;<TARGET />');
        !           109:     print(OUT $in."\n");
        !           110:     close(OUT);
1.3       harris41  111:   }
1.1       harris41  112: }
                    113: </perlscript>
                    114: </file>
                    115: <file>
                    116: <target dist='default'>/etc/httpd/conf/access.conf</target>
                    117: <note>This may or may not exist on a system depending on the version of
                    118: Apache</note>
                    119: <dependencies dist='default'>
                    120: /etc/httpd/conf/access.conf
                    121: </dependencies>
                    122: <perlscript mode='fg'>
1.11    ! harris41  123: if (-e '<TARGET />') {
        !           124:   my $flag=0;
        !           125:   open(IN,'&lt;<TARGET />');
        !           126:   while (&lt;IN&gt;) {
        !           127:     if (/^\s*Include\s+conf\/loncapa_apache.conf/) {
        !           128:       $flag=1;
        !           129:     }
        !           130:   }
        !           131:   close(IN);
        !           132:   unless ($flag==1) {
        !           133:     open(OUT,'&gt;&gt;<TARGET />');
        !           134:     print(OUT 'Include conf/loncapa_apache.conf'."\n");
        !           135:     close(OUT);
        !           136:   }
        !           137:   $flag=0;
        !           138:   open(IN,'&lt;<TARGET />');
        !           139:   while (&lt;IN&gt;) { if (/^\s*Include\s+conf\/loncapa.conf/) { $flag=1; } }
        !           140:   close(IN);
        !           141:   $in='';
        !           142:   if ($flag==1) {
        !           143:     open(IN,'&lt;<TARGET />');
        !           144:     while(&lt;IN&gt;) {
        !           145:       $in.=$_ unless /^\s*Include\s+conf\/loncapa.conf/;
        !           146:     }
        !           147:     close(IN);
        !           148:     open(OUT,'&gt;<TARGET />');
        !           149:     print(OUT $in."\n");
        !           150:     close(OUT);
        !           151:   }
1.3       harris41  152: }
1.1       harris41  153: </perlscript>
                    154: </file>
                    155: <file>
                    156: <target dist='default'>/etc/httpd/conf/srm.conf</target>
                    157: <note>This may or may not exist on a system depending on the version of
                    158: Apache</note>
                    159: <dependencies dist='default'>
                    160: /etc/httpd/conf/srm.conf
                    161: </dependencies>
                    162: <perlscript mode='fg'>
1.11    ! harris41  163: if (-e '<TARGET />') {
        !           164:   my $flag=0;
        !           165:   open(IN,'&lt;<TARGET />');
        !           166:   while (&lt;IN&gt;) {
        !           167:     if (/^\s*Include\s+conf\/loncapa_apache.conf/) {
        !           168:       $flag=1;
        !           169:     }
        !           170:   }
        !           171:   close(IN);
        !           172:   unless ($flag==1) {
        !           173:     open(OUT,'&gt;&gt;<TARGET />');
        !           174:     print(OUT 'Include conf/loncapa_apache.conf'."\n");
        !           175:     close(OUT);
        !           176:   }
        !           177:   $flag=0;
        !           178:   open(IN,'&lt;<TARGET />');
        !           179:   while (&lt;IN&gt;) {
        !           180:     if (/^\s*Include\s+conf\/loncapa.conf/) {
        !           181:       $flag=1;
        !           182:     }
        !           183:   }
        !           184:   close(IN);
        !           185:   $in='';
        !           186:   if ($flag==1) {
        !           187:     open(IN,'&lt;<TARGET />');
        !           188:     while(&lt;IN&gt;) {
        !           189:       $in.=$_ unless /^\s*Include\s+conf\/loncapa.conf/;
        !           190:     }
        !           191:     close(IN);
        !           192:     open(OUT,'&gt;<TARGET />');
        !           193:     print(OUT $in."\n");
        !           194:     close(OUT);
        !           195:   }
1.3       harris41  196: }
1.1       harris41  197: </perlscript>
                    198: </file>
                    199: </files>
                    200: </piml>

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