feature: changed version element name, added grid square

This commit is contained in:
Darryl Quinn 2015-07-13 20:32:17 -05:00
parent e8333f76ea
commit 3c86ff9ec8
1 changed files with 8 additions and 3 deletions

View File

@ -42,7 +42,7 @@ read_query_string();
my %info;
$info{"json_version"}="1.0";
$info{"api_version"}="1.0";
# ============ GENERATE INFO HASH =========
$node=nvram_get("node");
@ -71,9 +71,9 @@ $info{"firmware_version"}=$fwver;
# ------- Tunnel Installed
if (-e "/usr/sbin/vtund")
{
$tunnel_installed="YES";
$tunnel_installed="true";
} else {
$tunnel_installed="NO";
$tunnel_installed="false";
}
$info{"tunnel_installed"}=$tunnel_installed;
@ -98,6 +98,11 @@ $lon=`tail -1 /etc/latlon 2>/dev/null`;
chomp($lon);
$info{"lon"}=$lon;
# ------- GRID SQUARE
$grid=`head -1 /etc/gridsquare 2>/dev/null`;
chomp($grid);
$info{"grid_square"}=$grid;
# ----------- GENERATE THE JSON ------------
print "{";