From: Christian Weiske Date: Tue, 28 Dec 2010 21:53:06 +0000 (+0100) Subject: add help to munin plugin X-Git-Tag: 1.0.0~5 X-Git-Url: https://git.cweiske.de/linksys-wrt3g-tools.git/commitdiff_plain/cd3b46894c6f014735a7f278a60b9bd234a11ba0 add help to munin plugin --- diff --git a/scripts/munin.php b/scripts/munin.php index 5fc2526..4872e90 100755 --- a/scripts/munin.php +++ b/scripts/munin.php @@ -1,28 +1,37 @@ #!/usr/bin/env php -* @license AGPL v3 -* @link http://cweiske.de/linksys-wrt3g-tools.htm -*/ + * Munin node plugin to monitor the router status. + * Part of Linksys WRT3G tools + * + * PHP version 5 + * + * @category Tools + * @package linksys-wrt3g-tools + * @author Christian Weiske + * @license AGPL v3 + * @link http://cweiske.de/linksys-wrt3g-tools.htm + * @link http://munin-monitoring.org/wiki/ConcisePlugins + */ require_once 'Wrt3g.php'; if (isset($argv[1]) && $argv[1] == 'autoconf') { - echo "yes\n"; + $router = new Wrt3g(); + $router->loadConfig(); + if ($router->config->host === null) { + echo "no (no host configured)\n"; + } else { + echo "yes\n"; + } exit(); + } else if (isset($argv[1]) && $argv[1] == 'config') { echo << - Print status + TXT; exit(); }