Skip to content
Snippets Groups Projects
Commit 6ab9d341 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-hoodselector: use gluon-switch-domain

parent 6750aef0
No related branches found
No related tags found
No related merge requests found
......@@ -67,9 +67,7 @@ end
function M.set_domain_config(domain)
if uci:get('gluon', 'core', 'domain') ~= domain.domain_code then
uci:set('gluon', 'core', 'domain', domain.domain_code)
uci:commit('gluon')
os.execute('gluon-reconfigure')
os.execute(string.format("exec gluon-switch-domain --no-reboot '%s'", domain.domain_code))
M.log('Set domain "'..domain.domain.domain_names[domain.domain_code]..'"')
return true
end
......
......@@ -40,7 +40,6 @@ if geo.lat ~= nil and geo.lon ~= nil then
local geo_base_domain = hoodutil.get_domain_by_geo(jdomains, geo)
if geo_base_domain ~= nil then
if hoodutil.set_domain_config(geo_base_domain) then
os.execute("gluon-reload")
hoodutil.log('Domain set by geolocation mode.\n')
end
return
......@@ -51,6 +50,4 @@ else
end
-- default domain mode
if hoodutil.set_domain_config(hoodutil.get_default_domain(hoodutil.get_domains())) then
os.execute("gluon-reload")
end
hoodutil.set_domain_config(hoodutil.get_default_domain(hoodutil.get_domains()))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment