Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(centreontrapd): check if conf file is not empty before to load it (
Browse files Browse the repository at this point in the history
…#11708)

Co-authored-by: TamazC <103252125+TamazC@users.noreply.github.com>
  • Loading branch information
lpinsivy and TamazC authored Oct 3, 2022
1 parent 7b32236 commit 07322c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/perl/centreon/script.pm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ sub parse_options {
die "Command line error" if !GetOptions(%{$self->{options}});
pod2usage(-exitval => 1, -input => $FindBin::Bin . "/" . $FindBin::Script) if $self->{help};
if ($self->{noconfig} == 0) {
if (-e "$self->{config_file}") {
if (-e "$self->{config_file}" && -s "$self->{config_file}") {
require $self->{config_file};
$self->{centreon_config} = $centreon_config;
}
Expand Down

0 comments on commit 07322c0

Please sign in to comment.