Skip to content
Snippets Groups Projects
Commit 58be8063 authored by Jan-Tarek Butt's avatar Jan-Tarek Butt
Browse files

remove if function

parent 4b8fb4f0
No related branches found
No related tags found
No related merge requests found
......@@ -3,17 +3,6 @@
local site = require 'gluon.site_config'
local uci = require('luci.model.uci').cursor()
local config = 'gluon-node-info'
local autolocation = uci:get(config, uci:get_first(config, 'location'), 'auto_location')
if site.location then
default_autolocation = site.location.autolocation
else
default_autolocation = autolocation
end
if autolocation == 0 then
uci:set(config, uci:get_first(config, 'location'), 'auto_location', default_autolocation)
uci:save(config)
uci:commit(config)
end
uci:set('gluon-node-info', uci:get_first('gluon-node-info', 'location'), 'auto_location', site.location.autolocation)
uci:save('gluon-node-info')
uci:commit('gluon-node-info')
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