git-svn-id: http://www.observium.org/svn/observer/trunk@382 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-03-25 15:25:58 +00:00
parent 3f392bcd71
commit 4b0a873017
4 changed files with 21 additions and 14 deletions

View File

@@ -21,9 +21,10 @@ if($argv[1] == "--device" && $argv[2]) {
} elseif ($argv[1] == "--all") {
$where = "";
} elseif ($argv[1] == "--forced") {
echo("Doing forced discoveries\n");
$sql = mysql_query("SELECT * FROM devices_attribs AS A, `devices` AS D WHERE A.attrib_type = 'discover' AND A.device_id = D.device_id AND D.ignore = '0' AND D.disabled = '0'");
while($device = mysql_fetch_array($sql)){
shell_exec("./discover --device " . $device['device_id']);
echo(shell_exec("./discovery.php --device " . $device['device_id']));
}
exit;
} else {