mirror of https://github.com/aredn/aredn.git
feature: add mesh gateway setting to sysinfo.json (#77)
This commit is contained in:
parent
1381cf3868
commit
38b5e01fee
|
@ -487,4 +487,13 @@ function model.getLocalHosts()
|
||||||
return hosts
|
return hosts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------
|
||||||
|
-- Returns Mesh gateway setting
|
||||||
|
-------------------------------------
|
||||||
|
function model.getMeshGatewaySetting()
|
||||||
|
gw=os.capture("cat /etc/config.mesh/_setup|grep olsrd_gw|cut -d'=' -f2|tr -d ' ' ")
|
||||||
|
gw=gw:chomp()
|
||||||
|
return gw
|
||||||
|
end
|
||||||
|
|
||||||
return model
|
return model
|
|
@ -55,7 +55,7 @@ end
|
||||||
info={}
|
info={}
|
||||||
|
|
||||||
-- API version
|
-- API version
|
||||||
info['api_version']="1.7"
|
info['api_version']="1.8"
|
||||||
|
|
||||||
|
|
||||||
-- NODE name
|
-- NODE name
|
||||||
|
@ -81,6 +81,9 @@ info['node_details']['firmware_mfg']=fw_mfg
|
||||||
-- Firmware version
|
-- Firmware version
|
||||||
info['node_details']['firmware_version']=aredn_info.getFirmwareVersion()
|
info['node_details']['firmware_version']=aredn_info.getFirmwareVersion()
|
||||||
|
|
||||||
|
-- Mesh Gatway
|
||||||
|
info['node_details']['mesh_gateway']=aredn_info.getMeshGatewaySetting()
|
||||||
|
|
||||||
-- Mesh RF info
|
-- Mesh RF info
|
||||||
info['meshrf']={}
|
info['meshrf']={}
|
||||||
local radio=aredn_info.getMeshRadioDevice()
|
local radio=aredn_info.getMeshRadioDevice()
|
||||||
|
|
Loading…
Reference in New Issue