diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua index 070fb5b9bf5..956f8959d4c 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua @@ -1,5 +1,6 @@ require "luci.ip" require "nixio.fs" +require "luci.sys" local m, s, o m = Map("shadowsocksr") @@ -140,4 +141,11 @@ o.remove = function(self, section, value) nixio.fs.writefile(netflixconf, "") end +if luci.sys.call('[ -f "/www/luci-static/resources/uci.js" ]') == 0 then + m.apply_on_parse = true + function m.on_apply(self) + luci.sys.call("/etc/init.d/shadowsocksr reload > /dev/null 2>&1 &") + end +end + return m