Added filter to get_bad_conf_files when is a srv conf file. Ticket #4163

(cherry picked from commit a376105f97)
This commit is contained in:
Arturo Gonzalez 2016-12-27 12:00:00 +01:00
parent 527de7b0b3
commit 7c20bf405c
1 changed files with 11 additions and 9 deletions

View File

@ -3716,16 +3716,18 @@ sub cli_get_bad_conf_files() {
my $missings = 0;
my @tokens = ("server_ip","server_path","temporal","logfile");
foreach my $token (@tokens) {
if(enterprise_hook('pandora_check_conf_token',[$conf->{incomingdir}.'/conf/'.$file, $token]) == 0) {
$missings++;
if ($file !~ /.srv./) {
foreach my $token (@tokens) {
if(enterprise_hook('pandora_check_conf_token',[$conf->{incomingdir}.'/conf/'.$file, $token]) == 0) {
$missings++;
}
}
# If any token of checked is missed we print the file path
if($missings > 0) {
print $conf->{incomingdir}.'/conf/'.$file."\n";
$bad_files++;
}
}
# If any token of checked is missed we print the file path
if($missings > 0) {
print $conf->{incomingdir}.'/conf/'.$file."\n";
$bad_files++;
}
}