--- loncom/lond 2002/05/08 02:31:04 1.79 +++ loncom/lond 2002/05/11 21:24:56 1.80 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.79 2002/05/08 02:31:04 foxr Exp $ +# $Id: lond,v 1.80 2002/05/11 21:24:56 harris41 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,6 +53,7 @@ # 02/12 Gerd Kortemeyer # 02/19 Matthew Hall # 02/25 Gerd Kortemeyer +# 05/11 Scott Harrison ### # based on "Perl Cookbook" ISBN 1-56592-243-3 @@ -61,6 +62,9 @@ # HUPs # uses IDEA encryption +use lib '/home/httpd/lib/perl/'; +use LONCAPA::Configuration; + use IO::Socket; use IO::File; use Apache::File; @@ -101,18 +105,11 @@ sub timeout { $SIG{'QUIT'}=\&catchexception; $SIG{__DIE__}=\&catchexception; -# ------------------------------------ Read httpd access.conf and get variables - -open (CONFIG,"/etc/httpd/conf/access.conf") || die "Can't read access.conf"; - -while ($configline=) { - if ($configline =~ /PerlSetVar/) { - my ($dummy,$varname,$varvalue)=split(/\s+/,$configline); - chomp($varvalue); - $perlvar{$varname}=$varvalue; - } -} -close(CONFIG); +# ------------------------------------------- Read access.conf and loncapa.conf +&status("Read access.conf and loncapa.conf"); +my $perlvarref=LONCAPA::Configuration::read_conf('access.conf','loncapa.conf'); +my %perlvar=%{$perlvarref}; +undef $perlvarref; # ----------------------------- Make sure this process is running from user=www my $wwwid=getpwnam('www');