mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
move poller.php (inc os/system) to db* (and others, but poller is biggest change)
git-svn-id: http://www.observium.org/svn/observer/trunk@2298 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -38,7 +38,7 @@ if (isset($argv[1]) && $argv[1])
|
||||
}
|
||||
|
||||
list($hostshort) = explode(".", $host);
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `devices` WHERE `hostname` = '".mres($host)."'"), 0) == '0')
|
||||
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0')
|
||||
{
|
||||
if (isDomainResolves($argv[1]))
|
||||
{
|
||||
@@ -69,4 +69,4 @@ if (isset($argv[1]) && $argv[1])
|
||||
} else { echo("Already got host $host\n"); }
|
||||
} else { echo("Add Host Tool\nUsage: ./addhost.php <hostname> [community] [v1|v2c] [port] [" . join("|",$config['snmp']['transports']) . "]\n"); }
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user