diff --git a/package/gluon-hoodselector/luasrc/usr/lib/lua/hoodselector/util.lua b/package/gluon-hoodselector/luasrc/usr/lib/lua/hoodselector/util.lua index b93097a6..af079f36 100644 --- a/package/gluon-hoodselector/luasrc/usr/lib/lua/hoodselector/util.lua +++ b/package/gluon-hoodselector/luasrc/usr/lib/lua/hoodselector/util.lua @@ -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 diff --git a/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector b/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector index 12125da7..03852272 100755 --- a/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector +++ b/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector @@ -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()))