feature: add mesh gateway setting to sysinfo.json (#77)

This commit is contained in:
dman776 2021-03-15 09:39:27 -05:00 committed by GitHub
parent 1381cf3868
commit 38b5e01fee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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()