2009-12-15 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Make modules with a module_interval run the first time. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2199 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
126d51f874
commit
a26115d2f7
|
@ -1,3 +1,7 @@
|
|||
2009-12-15 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandora_agent: Make modules with a module_interval run the first time.
|
||||
|
||||
2009-12-07 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* plugins/inventory: Fixed some problems with the plugin (for linux). Added
|
||||
|
|
|
@ -180,6 +180,11 @@ sub read_config (;$) {
|
|||
$module->{'max'} = $1;
|
||||
} elsif ($line =~ /^\s*module_min\s+(\d+)\s*$/) {
|
||||
$module->{'max'} = $1;
|
||||
} elsif ($line =~ /^\s*module_interval\s+(\d+)\s*$/) {
|
||||
$module->{'interval'} = $1;
|
||||
|
||||
# Make the module run the first time
|
||||
$module->{'counter'} = $1;
|
||||
} elsif ($line =~ /^\s*module_end\s*$/) {
|
||||
next unless ($module->{'name'} ne '') and ($module->{'exec'} ne '');
|
||||
push (@Modules, $module);
|
||||
|
@ -543,7 +548,7 @@ while (1) {
|
|||
|
||||
# Check module interval
|
||||
next unless (++$module->{'counter'} >= $module->{'interval'});
|
||||
|
||||
print "INTERVAL: " . $module->{'interval'} . "\n";
|
||||
# Reset module counter
|
||||
$module->{'counter'} = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue