فهرست منبع

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