mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
lnms dev:simulate check simulated device exists (#14243)
This commit is contained in:
@@ -51,6 +51,13 @@ class DevSimulate extends LnmsCommand
|
||||
$snmprec_dir = $this->snmpsim->getDir();
|
||||
$listen = $this->snmpsim->getIp() . ':' . $this->snmpsim->getPort();
|
||||
|
||||
$file = $this->argument('file');
|
||||
if ($file && ! file_exists(base_path("tests/snmpsim/$file.snmprec"))) {
|
||||
$this->error("$file does not exist");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
$snmpsim = new Process([
|
||||
$this->snmpsim->findSnmpsimd(),
|
||||
"--data-dir=$snmprec_dir",
|
||||
|
Reference in New Issue
Block a user