version 1.84, 2010/07/17 20:01:56
|
version 1.86, 2010/08/17 22:22:00
|
Line 691 sub write_loncaparevs {
|
Line 691 sub write_loncaparevs {
|
foreach my $id (sort(keys(%hostname))) { |
foreach my $id (sort(keys(%hostname))) { |
if ($id ne '') { |
if ($id ne '') { |
my $loncaparev = &Apache::lonnet::get_server_loncaparev('',$id,1,'loncron'); |
my $loncaparev = &Apache::lonnet::get_server_loncaparev('',$id,1,'loncron'); |
if ($loncaparev =~ /^[\d.\-]+$/) { |
if ($loncaparev =~ /^[\w.\-]+$/) { |
print $fh $id.':'.$loncaparev."\n"; |
print $fh $id.':'.$loncaparev."\n"; |
} |
} |
} |
} |
Line 701 sub write_loncaparevs {
|
Line 701 sub write_loncaparevs {
|
return; |
return; |
} |
} |
|
|
|
sub write_serverhomeIDs { |
|
if (open(my $fh,">$perlvar{'lonTabDir'}/serverhomeIDs.tab")) { |
|
my %name_to_host = &Apache::lonnet::all_names(); |
|
foreach my $name (sort(keys(%name_to_host))) { |
|
if ($name ne '') { |
|
if (ref($name_to_host{$name}) eq 'ARRAY') { |
|
my $serverhomeID = &Apache::lonnet::get_server_homeID($name,1,'loncron'); |
|
if ($serverhomeID ne '') { |
|
print $fh $name.':'.$serverhomeID."\n"; |
|
} else { |
|
print $fh $name.':'.$name_to_host{$name}->[0]."\n"; |
|
} |
|
} |
|
} |
|
} |
|
close($fh); |
|
} |
|
return; |
|
} |
|
|
sub send_mail { |
sub send_mail { |
print "sending mail\n"; |
print "sending mail\n"; |
my $defdom = $perlvar{'lonDefDomain'}; |
my $defdom = $perlvar{'lonDefDomain'}; |
Line 851 sub main () {
|
Line 871 sub main () {
|
} |
} |
if (!$justcheckconnections && !$justreload) { |
if (!$justcheckconnections && !$justreload) { |
&write_loncaparevs(); |
&write_loncaparevs(); |
|
&write_serverhomeIDs(); |
} |
} |
} |
} |
|
|