소스 검색

luci-app-ssr-plus: Add Delete all subscribe nodes and md5 value at the same time.

zxl hhyccc 3 달 전
부모
커밋
abc620e70a
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua

+ 4 - 0
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua

@@ -1,6 +1,7 @@
 -- Licensed to the public under the GNU General Public License v3.
 require "luci.http"
 require "luci.sys"
+require "nixio.fs"
 require "luci.dispatcher"
 require "luci.model.uci"
 local uci = require "luci.model.uci".cursor()
@@ -151,6 +152,9 @@ o.write = function()
 	end)
 	uci:save("shadowsocksr")
 	uci:commit("shadowsocksr")
+	for file in nixio.fs.glob("/tmp/sub_md5_*") do
+		nixio.fs.remove(file)
+	end
 	luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "delete"))
 	return
 end