manman-sync: fix setting location

This commit is contained in:
Maciej Krüger 2022-01-16 05:44:09 +01:00 committed by Alexander List
parent 4195b5a569
commit 5d14d3e3d1

View File

@ -126,10 +126,12 @@ if uci:get_bool('gluon-manman-sync', 'sync', 'enabled') then
print('Syncing with location ' .. location.location.name)
uci:set('gluon-node-info', 'owner', 'contact', location.administrator.email)
uci:set('gluon-node-info', 'location', 'share_location', '1')
uci:set('gluon-node-info', 'location', 'latitude', location.location.lat)
uci:set('gluon-node-info', 'location', 'longitutde', location.location.long)
local owner = uci:get_first('gluon-node-info', 'owner')
uci:set('gluon-node-info', owner, 'contact', location.administrator.email)
local _location = uci:get_first('gluon-node-info', 'location')
uci:set('gluon-node-info', _location, 'share_location', '1')
uci:set('gluon-node-info', _location, 'latitude', location.location.lat)
uci:set('gluon-node-info', _location, 'longitutde', location.location.long)
local node
local should_hostname