summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/common.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-01-23 10:18:48 +0000
committerramon <ramongomez@us.es>2017-01-23 10:18:48 +0000
commit90e3284ffe65dd6de32bfa877cbbfc50739f785b (patch)
treef947b0c63ad5f7993a3dab99ae8d2b3c3eafe434 /admin/WebConsole/rest/common.php
parent6608f1e79bbe5a02ddf84458738178d3416080e8 (diff)
#708 #768: Mostrar datos de clientes ogLive instalados en ruta {{{/info}}} y acatulizar documentación de la API REST.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5154 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/common.php')
-rw-r--r--admin/WebConsole/rest/common.php15
1 files changed, 3 insertions, 12 deletions
diff --git a/admin/WebConsole/rest/common.php b/admin/WebConsole/rest/common.php
index b770a1a8..e5cd30fe 100644
--- a/admin/WebConsole/rest/common.php
+++ b/admin/WebConsole/rest/common.php
@@ -54,18 +54,9 @@ $app->get('/info', function() {
if (@$services["RUN_BTTRACKER"] === "yes") array_push($response['services'], "tracker");
// Reading installed ogLive information file.
if ($hasOglive === true) {
- $data = explode('-', @file_get_contents('/opt/opengnsys/doc/veroglive.txt'));
- if ($data[0] === "ogLive") {
- array_shift($data);
- $response['oglive'] = array();
- $tmp = Array();
- $tmp['distribution'] = trim($data[0]);
- array_shift($data);
- $tmp['revision'] = trim(end($data));
- array_pop($data);
- $tmp['kernel'] = trim(implode('-', $data));
- $tmp['directory'] = "tftpboot/ogclient";
- array_push($response['oglive'], $tmp);
+ $data = json_decode(@file_get_contents('/opt/opengnsys/etc/ogliveinfo.json'));
+ if (isset($data->oglive)) {
+ $response['oglive'] = $data->oglive;
}
}
jsonResponse(200, $response);