mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
remove old poll-os file (can now use os discovery type)
git-svn-id: http://www.observium.org/svn/observer/trunk@542 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
18
poll-os.php
18
poll-os.php
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
include("config.php");
|
||||
include("includes/functions.php");
|
||||
|
||||
$device_query = mysql_query("SELECT device_id,hostname,os,community,snmpver,port FROM `devices` WHERE `device_id` LIKE '%" . $argv[1] . "' AND status = '1' ORDER BY device_id DESC");
|
||||
while ($device = mysql_fetch_array($device_query)) {
|
||||
|
||||
|
||||
$os = getHostOS($device);
|
||||
|
||||
if($os != $device['os']) {
|
||||
$sql = mysql_query("UPDATE `devices` SET `os` = '$os' WHERE `device_id` = '".$device['device_id']."'");
|
||||
echo("Updated host : ".$device['hostname']." ($os)\n");
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user