--- loncom/loncron 2017/02/28 05:42:06 1.104 +++ loncom/loncron 2018/07/18 13:44:55 1.106 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.104 2017/02/28 05:42:06 raeburn Exp $ +# $Id: loncron,v 1.106 2018/07/18 13:44:55 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -646,9 +646,15 @@ sub check_delayed_msg { my $unsend=0; + my %hostname = &Apache::lonnet::all_hostnames(); + my $numhosts = scalar(keys(%hostname)); + my $dfh=IO::File->new("$perlvar{'lonDaemons'}/logs/lonnet.perm.log"); while (my $line=<$dfh>) { my ($time,$sdf,$dserv,$dcmd)=split(/:/,$line); + if ($numhosts) { + next unless ($hostname{$dserv}); + } if ($sdf eq 'F') { my $local=localtime($time); &log($fh,"Failed: $time, $dserv, $dcmd
"); @@ -675,8 +681,6 @@ sub check_delayed_msg { } &log($fh,"\n"); close (DFH); - my %hostname = &Apache::lonnet::all_hostnames(); - my $numhosts = scalar(keys(%hostname)); # pong to all servers that have delayed messages # this will trigger a reverse connection, which should flush the buffers foreach my $tryserver (sort(keys(%servers))) { @@ -938,6 +942,14 @@ sub write_hosttypes { } } +sub update_revocation_list { + if (&Apache::lonnet::fetch_crl_pemfile() eq 'ok') { + print "Certificate Revocation List (from CA) updated.\n"; + } else { + print "Certificate Revocation List from (CA) not updated.\n"; + } +} + sub send_mail { my $defdom = $perlvar{'lonDefDomain'}; my $origmail = $perlvar{'lonAdmEMail'}; @@ -1130,6 +1142,7 @@ sub main () { &write_checksums(); &write_connection_config(); &write_hosttypes(); + &update_revocation_list(); if ($totalcount>200 && !$noemail) { &send_mail(); } } }