mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #1263 from paulgear/multiple-discovery-modules
Allow multiple comma-separated discovery modules to be specified
This commit is contained in:
@ -81,12 +81,12 @@ function discover_device($device, $options = NULL)
|
||||
|
||||
echo("\n");
|
||||
|
||||
// If we've specified a module, use that, else walk the modules array
|
||||
if ($options['m'])
|
||||
{
|
||||
if (is_file("includes/discovery/".$options['m'].".inc.php"))
|
||||
{
|
||||
include("includes/discovery/".$options['m'].".inc.php");
|
||||
// If we've specified modules, use them, else walk the modules array
|
||||
if ($options['m']) {
|
||||
foreach (explode(',', $options['m']) as $module) {
|
||||
if (is_file("includes/discovery/$module.inc.php")) {
|
||||
include("includes/discovery/$module.inc.php");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach ($config['discovery_modules'] as $module => $module_status)
|
||||
|
Reference in New Issue
Block a user