When apply, config file did not changed immediately

Hi developers !
I have a CBI table looks like this:

m = Map("someApp", "Title", "Some secondary text.")
o = m:section(TypedSection, "someSection", "")
o.addremove = false
o.anonymous = true
enable = o:option(Flag, "enable", "Enable")
local apply = luci.http.formvalue("cbi.apply")
if apply then
io.popen("/etc/init.d/someApp restart")
end
return m

The thing is, when it apply and execute restart, the config file didn't changed before the restart process, which makes the config loaded as the old one.

Instead of using function enable.cfgvalue to hook each option, is there anyway to solve this problem?

Thank you whether you can made contribution for this question :slight_smile: