From 0d7280a1b89e187b4b21a3a2e685d46e5210551c Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 28 Dec 2010 21:57:52 +0100 Subject: [PATCH] use new config for munin script --- Wrt3g.php | 2 +- scripts/munin.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Wrt3g.php b/Wrt3g.php index 6b12ac5..c0ee3b0 100644 --- a/Wrt3g.php +++ b/Wrt3g.php @@ -63,7 +63,7 @@ class Wrt3g * * @see Wrt3g_Config */ - public function loadConfig($options) + public function loadConfig($options = array()) { $this->config = new Wrt3g_Config($this); $this->config->load($options); diff --git a/scripts/munin.php b/scripts/munin.php index cf7892f..5fc2526 100755 --- a/scripts/munin.php +++ b/scripts/munin.php @@ -11,7 +11,6 @@ * @license AGPL v3 * @link http://cweiske.de/linksys-wrt3g-tools.htm */ -require_once dirname(__FILE__) . '/../config.php'; require_once 'Wrt3g.php'; if (isset($argv[1]) && $argv[1] == 'autoconf') { @@ -50,9 +49,7 @@ TXT; try { $router = new Wrt3g(); - $router->host = $GLOBALS['linksys-wrt3g-tools']['host']; - $router->user = $GLOBALS['linksys-wrt3g-tools']['user']; - $router->password = $GLOBALS['linksys-wrt3g-tools']['password']; + $router->loadConfig(); $arStatus = $router->getConnectionStatus(); -- 2.30.2