--- loncom/loncron 2015/05/28 23:50:15 1.102 +++ loncom/loncron 2015/09/20 18:31:21 1.103 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.102 2015/05/28 23:50:15 raeburn Exp $ +# $Id: loncron,v 1.103 2015/09/20 18:31:21 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -921,9 +921,23 @@ sub main () { } # -------------------------------------------- Force reload of host information - &Apache::lonnet::load_hosts_tab(1); - &Apache::lonnet::load_domain_tab(1); - &Apache::lonnet::get_iphost(1); + my $nomemcache; + if ($justcheckdaemons) { + $nomemcache=1; + my $memcachepidfile="$perlvar{'lonDaemons'}/logs/memcached.pid"; + my $memcachepid; + if (-e $memcachepidfile) { + my $memfh=IO::File->new($memcachepidfile); + $memcachepid=<$memfh>; + chomp($memcachepid); + if ($memcachepid =~ /^\d+$/ && kill 0 => $memcachepid) { + undef($nomemcache); + } + } + } + &Apache::lonnet::load_hosts_tab(1,$nomemcache); + &Apache::lonnet::load_domain_tab(1,$nomemcache); + &Apache::lonnet::get_iphost(1,$nomemcache); # ----------------------------------------- Force firewall update for lond port