From: Christian Weiske Date: Tue, 28 Dec 2010 20:57:52 +0000 (+0100) Subject: use new config for munin script X-Git-Tag: 1.0.0~7 X-Git-Url: https://git.cweiske.de/linksys-wrt3g-tools.git/commitdiff_plain/0d7280a1b89e187b4b21a3a2e685d46e5210551c use new config for munin script --- 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();