mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Find snmpsimd binary rather than infer snmpsimd.py (#8952)
instead of calling snmpsimd.py blindly DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
This commit is contained in:
committed by
Neil Lathwood
parent
e5fb7c9f16
commit
d566544743
@ -151,7 +151,12 @@ class Snmpsim
|
||||
*/
|
||||
private function getCmd($with_log = true)
|
||||
{
|
||||
$cmd = "snmpsimd.py --data-dir={$this->snmprec_dir} --agent-udpv4-endpoint={$this->ip}:{$this->port}";
|
||||
$cmd = Config::locateBinary('snmpsimd');
|
||||
if (!is_executable($cmd)) {
|
||||
$cmd = Config::locateBinary('snmpsimd.py');
|
||||
}
|
||||
|
||||
$cmd .= " --data-dir={$this->snmprec_dir} --agent-udpv4-endpoint={$this->ip}:{$this->port}";
|
||||
|
||||
if (is_null($this->log)) {
|
||||
$cmd .= " --logging-method=null";
|
||||
|
Reference in New Issue
Block a user