Skip to content
Snippets Groups Projects
Commit f68a5662 authored by kb-light's avatar kb-light Committed by Matthias Schiffer
Browse files

gluon-node-info: add a script to fix whitespaces within the coordinates


Signed-off-by: default avatarkb-light <freifunk@kb-light.de>
parent 10638960
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/lua
local uci = require('luci.model.uci').cursor()
local sname = uci:get_first('gluon-node-info', 'location')
if sname then
local options = {'longitude', 'latitude', 'altitude'}
for _, option in ipairs(options) do
local value = uci:get('gluon-node-info', sname, option)
if value then
uci:set('gluon-node-info', sname, option, value:trim())
end
end
uci:save('gluon-node-info')
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment