while (my($index,$server) = each @{$cluster->{servers}})
{
- my $number = sprintf("%02d", $index + 1);
- my $bandwidth = $server->{bandwidth};
+ if ($server->{status} eq "up")
+ {
+ my $number = sprintf("%02d", $index + 1);
+ my $bandwidth = $server->{bandwidth};
- $gdnsweightedfile->print(" ${name}-${number} = [ ${name}-${number}.${zone}., ${bandwidth} ]\n");
+ $gdnsweightedfile->print(" ${name}-${number} = [ ${name}-${number}.${zone}., ${bandwidth} ]\n");
+ }
}
$gdnsweightedfile->print("}\n");