mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix poller.php with missing -h (#9621)
This commit is contained in:
@@ -21,6 +21,7 @@ echo $config['project_name_version']." Poller\n";
|
||||
|
||||
$options = getopt('h:m:i:n:r::d::v::a::f::q');
|
||||
|
||||
if (isset($options['h'])) {
|
||||
if ($options['h'] == 'odd') {
|
||||
$options['n'] = '1';
|
||||
$options['i'] = '2';
|
||||
@@ -43,6 +44,7 @@ if ($options['h'] == 'odd') {
|
||||
$doing = $options['h'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($options['i']) && $options['i'] && isset($options['n'])) {
|
||||
$where = true;
|
||||
@@ -58,7 +60,7 @@ if (isset($options['i']) && $options['i'] && isset($options['n'])) {
|
||||
$doing = $options['n'].'/'.$options['i'];
|
||||
}
|
||||
|
||||
if (!$where) {
|
||||
if (empty($where)) {
|
||||
echo "-h <device id> | <device hostname wildcard> Poll single device\n";
|
||||
echo "-h odd Poll odd numbered devices (same as -i 2 -n 0)\n";
|
||||
echo "-h even Poll even numbered devices (same as -i 2 -n 1)\n";
|
||||
|
Reference in New Issue
Block a user