load environment variables by default
[linksys-wrt3g-tools.git] / scripts / munin.php
index dc7d050ff862f0331e9c2a7ece7fe2185e60f6c6..0722035b74379e9359ac092a97f66f1eff3cf1d6 100755 (executable)
  */
 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();