Skip to content

Commit

Permalink
luci-app-ssr-plus: control.lua: Fix "Add or Remove" domain name list …
Browse files Browse the repository at this point in the history
…domain name click "Save and apply" pop-up "No changes to apply" box.
  • Loading branch information
zxlhhyccc authored Dec 18, 2024
1 parent 4af6d72 commit 5cabb3b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "luci.ip"
require "nixio.fs"
require "luci.sys"
local m, s, o

m = Map("shadowsocksr")
Expand Down Expand Up @@ -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

0 comments on commit 5cabb3b

Please sign in to comment.