Force ini syntax

Prevent error when the config is empty
tags/zabbix-agent-addons-0.2.20-1
Daniel Berteaud 8 years ago
parent 6c9239a5fd
commit a30233bf33
  1. 1
      zabbix_scripts/disco_sensors

@ -17,6 +17,7 @@ my $json;
my $cfg = new Config::Simple;
$cfg->read('/etc/zabbix/sensors.ini');
$cfg->syntax('ini');
my %sensors = ();
foreach my $k (keys %{$cfg->vars}){
$k =~ s/\..*$//;

Loading…
Cancel
Save