mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@2785 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -41,7 +41,7 @@ $config['sfdp'] = "/usr/bin/sfdp";
|
|||||||
|
|
||||||
if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["SERVER_PORT"]))
|
if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["SERVER_PORT"]))
|
||||||
{
|
{
|
||||||
$config['base_url'] = "http://" . $_SERVER["SERVER_NAME"] .":".$_SERVER["SERVER_PORT"]."/";
|
$config['base_url'] = "http://" . $_SERVER["SERVER_NAME"] .":".$_SERVER["SERVER_PORT"]."/";
|
||||||
}
|
}
|
||||||
|
|
||||||
$config['title_image'] = "images/observium-logo.png";
|
$config['title_image'] = "images/observium-logo.png";
|
||||||
@@ -54,7 +54,7 @@ $config['front_page'] = "pages/front/default.php";
|
|||||||
$config['page_title'] = "Observium :: Network Observation and Monitoring";
|
$config['page_title'] = "Observium :: Network Observation and Monitoring";
|
||||||
$config['timestamp_format'] = 'd-m-Y H:i:s';
|
$config['timestamp_format'] = 'd-m-Y H:i:s';
|
||||||
$config['page_gen'] = 1;
|
$config['page_gen'] = 1;
|
||||||
$config['web_header'] = "header.inc.php"; # in html/includes
|
$config['web_header'] = "header.inc.php"; # in html/includes
|
||||||
$config['login_message'] = "Unauthorised access or use shall render the user liable to criminal and/or civil prosecution.";
|
$config['login_message'] = "Unauthorised access or use shall render the user liable to criminal and/or civil prosecution.";
|
||||||
|
|
||||||
$config['int_customers'] = 1; # Enable Customer Port Parsing
|
$config['int_customers'] = 1; # Enable Customer Port Parsing
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ if ($config['enable_libvirt'] == '1' && $device['os'] == "linux" )
|
|||||||
{
|
{
|
||||||
# Check if we are using SSH if we can log in without password - without blocking the discovery
|
# Check if we are using SSH if we can log in without password - without blocking the discovery
|
||||||
# Also automatically add the host key so discovery doesn't block on the yes/no question, and run echo so we don't get stuck in a remote shell ;-)
|
# Also automatically add the host key so discovery doesn't block on the yes/no question, and run echo so we don't get stuck in a remote shell ;-)
|
||||||
exec('ssh -o "StrictHostKeyChecking no" -o "PreferredAuthentications publickey" -o "IdentitiesOnly yes" ' . $device['hostname'] . ' echo', $out, $ret);
|
exec('ssh -o "StrictHostKeyChecking no" -o "PreferredAuthentications publickey" -o "IdentitiesOnly yes" ' . $device['hostname'] . ' echo -e', $out, $ret);
|
||||||
if ($ret != 255) { $ssh_ok = 1; }
|
if ($ret != 255) { $ssh_ok = 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,18 +4,24 @@
|
|||||||
include("config.php");
|
include("config.php");
|
||||||
include("includes/functions.php");
|
include("includes/functions.php");
|
||||||
|
|
||||||
$fd = fopen($argv[1],'r');
|
if ($fd = @fopen($argv[1],'r'))
|
||||||
$data = fread($fd,4096);
|
|
||||||
while (!feof($fd))
|
|
||||||
{
|
{
|
||||||
$data .= fread($fd,4096);
|
$data = fread($fd,4096);
|
||||||
}
|
while (!feof($fd))
|
||||||
|
{
|
||||||
|
$data .= fread($fd,4096);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (explode("\n", $data) as $line)
|
foreach (explode("\n", $data) as $line)
|
||||||
|
{
|
||||||
|
$update = mysql_query($line);
|
||||||
|
# FIXME check query success?
|
||||||
|
echo("$line \n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
$update = mysql_query($line);
|
echo("ERROR: Could not open file \"$argv[1]\".\n");
|
||||||
# FIXME check query success?
|
|
||||||
echo("$line \n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user