feature: changed version element name, added grid square

This commit is contained in:
Darryl Quinn 2015-07-13 20:32:17 -05:00 committed by Conrad Lara - KG6JEI
parent 2a63226ad3
commit cb09c22275
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 "{";