)
);
-$parser->addCommand(
+$stCmd = $parser->addCommand(
'status',
array(
'aliases' => array('s', 'st'),
'description' => 'Show the router status'
)
);
+$stCmd = $parser->addCommand(
+ 'cardstatus',
+ array(
+ 'aliases' => array('c', 'cs'),
+ 'description' => 'Show the card/SIM status'
+ )
+);
+
+
$parser->addCommand(
'reboot',
array(
$router->user = $result->options['user'];
$router->password = $result->options['password'];
+ $router->log('Command: ' . $result->command_name, 2);
+
switch ($result->command_name) {
case 'reboot':
$resp = $router->reboot();
}
break;
+ case 'cardstatus':
case 'status':
default:
- $arStatus = $router->getStatus();
+ if ($result->command_name == 'cardstatus') {
+ $arStatus = $router->getCardStatus();
+ } else {
+ $arStatus = $router->getStatus();
+ }
foreach ($arStatus as $key => $value) {
echo $key . ': ' . $value . "\n";
}