fix munin.php
[linksys-wrt3g-tools.git] / munin.php
index b645e5c67fb900bd2ca1a4e3965c093ec9ff15ac..2b7a9e93f81c2076378efd43c35d9e440e1b4a8a 100755 (executable)
--- a/munin.php
+++ b/munin.php
@@ -12,7 +12,7 @@
 * @link     http://cweiske.de/linksys-wrt3g-tools.htm
 */
 require_once dirname(__FILE__) . '/config.php';
-require_once dirname(__FILE__) . '/functions.php';
+require_once 'Wrt3g.php';
 
 if (isset($argv[1]) && $argv[1] == 'autoconf') {
     echo "yes\n";
@@ -48,8 +48,10 @@ TXT;
 }
 
 
-$arStatus = wrt3g_getStatus();
 try {
+    $w = new Wrt3g();
+    $arStatus = $w->getStatus();
+
     $conn = $arStatus['connection'];
     if ($conn == 'disconnected') {
         echo "conn_disconnected.value 1\n";