version 1.6, 2002/05/13 02:24:44
|
version 1.7, 2002/05/13 09:05:18
|
Line 52 sleep(3);
|
Line 52 sleep(3);
|
</perlscript> |
</perlscript> |
</file> |
</file> |
<file> |
<file> |
<target dist='default'>/home/httpd/lonUsers2/</target> |
<target dist='default'>/home/httpd/lonUsers/</target> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
$|=1; |
$|=1; |
unless (-e "<TARGET />") { |
unless (-e "<TARGET />") { |
Line 242 END
|
Line 242 END
|
} |
} |
|
|
# update loncapa.conf |
# update loncapa.conf |
#my $confdir='/etc/httpd/conf/'; |
my $confdir='/etc/httpd/conf/'; |
my $confdir=''; |
#my $confdir=''; |
my $filename='loncapa.conf'; |
my $filename='loncapa.conf'; |
my %perlvar; |
my %perlvar; |
if (-e "$confdir$filename") { |
if (-e "$confdir$filename") { |
Line 295 END
|
Line 295 END
|
<target dist='default'>/</target> |
<target dist='default'>/</target> |
<perlscript mode='fg'> |
<perlscript mode='fg'> |
# read values from loncapa.conf |
# read values from loncapa.conf |
#my $confdir='/etc/httpd/conf/'; |
my $confdir='/etc/httpd/conf/'; |
my $confdir=''; |
#my $confdir=''; |
my $filename='loncapa.conf'; |
my $filename='loncapa.conf'; |
my %perlvar; |
my %perlvar; |
if (-e "$confdir$filename") { |
if (-e "$confdir$filename") { |
Line 311 my %perlvar;
|
Line 311 my %perlvar;
|
} |
} |
close(CONFIG); |
close(CONFIG); |
} |
} |
|
my %perlvarstatic; |
|
if (-e "${confdir}loncapa_apache.conf") { |
|
open(CONFIG,'<'.$confdir.'loncapa_apache.conf') or |
|
die("Can't read ${confdir}loncapa_apache.conf"); |
|
while (my $configline=<CONFIG>) { |
|
if ($configline =~ /^[^\#]*PerlSetVar/) { |
|
my ($unused,$varname,$varvalue)=split(/\s+/,$configline); |
|
chomp($varvalue); |
|
$perlvarstatic{$varname}=$varvalue; |
|
} |
|
} |
|
close(CONFIG); |
|
} |
# implement editing logic below, interactively |
# implement editing logic below, interactively |
# update loncapa.conf until 7 is entered |
# update loncapa.conf until 7 is entered |
|
|
Line 394 END
|
Line 407 END
|
|
|
} |
} |
} |
} |
|
open(OUT,">$confdir$filename") or |
|
die("Cannot output to $confdir$filename\n"); |
|
foreach my $key (keys %perlvar) { |
|
my $value=$perlvar{$key}; |
|
print(OUT <<END) unless $perlvarstat{$key}; |
|
PerlSetVar $key $value |
|
END |
|
} |
|
close(OUT); |
</perlscript> |
</perlscript> |
</file> |
</file> |
<file> |
<file> |