From 3859a2d6f8674cd48191aab236e0e2290b599ca8 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Sun, 8 Mar 2020 10:52:36 -0700 Subject: [PATCH] luci-app-ssr-plus: change delete all nodes logic --- package/lean/luci-app-ssr-plus/Makefile | 4 ++-- .../luasrc/model/cbi/shadowsocksr/servers.lua | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index d7caa77c3c..dcfdf67864 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus -PKG_VERSION:=164 -PKG_RELEASE:=2 +PKG_VERSION:=165 +PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua index a408b41611..ce3c05b689 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua @@ -66,8 +66,10 @@ uci:delete_all("shadowsocksr", "servers", function(s) return false end end) -uci:save("shadowsocksr") -luci.sys.call("uci commit shadowsocksr && /etc/init.d/shadowsocksr stop") +uci:save("shadowsocksr") +uci:commit("shadowsocksr") +luci.sys.init.stop("shadowsocksr") +luci.sys.init.start("shadowsocksr") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers")) return end