From d7d8ad1049df1955d4cedbdb88f55bad1b942a2f Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 28 Dec 2010 23:14:06 +0100 Subject: load environment variables by default --- scripts/munin.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'scripts/munin.php') diff --git a/scripts/munin.php b/scripts/munin.php index dc7d050..0722035 100755 --- a/scripts/munin.php +++ b/scripts/munin.php @@ -15,16 +15,9 @@ */ require_once 'Wrt3g.php'; -$options = array(); -foreach (array('host', 'user', 'password') as $variable) { - if (isset($_SERVER[$variable])) { - $options[$variable] = $_SERVER[$variable]; - } -} - if (isset($argv[1]) && $argv[1] == 'autoconf') { $router = new Wrt3g(); - $router->loadConfig($options); + $router->loadConfig(); if ($router->config->host === null) { echo "no (no host configured)\n"; } else { @@ -81,7 +74,7 @@ TXT; try { $router = new Wrt3g(); - $router->loadConfig($options); + $router->loadConfig(); $arStatus = $router->getConnectionStatus(); -- cgit v1.2.3