mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-27 03:06:59 +08:00
add del all servers function in ssr plus
This commit is contained in:
parent
247e2c5986
commit
c15e4e9017
@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SSR Plus
|
|||||||
LUCI_DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget
|
LUCI_DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
PKG_RELEASE:=27
|
PKG_RELEASE:=28
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
@ -37,6 +37,13 @@ o.write = function()
|
|||||||
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
|
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
o = s:option(Button,"delete",translate("Delete all severs"))
|
||||||
|
o.inputstyle = "reset"
|
||||||
|
o.write = function()
|
||||||
|
luci.sys.call("nohup bash /usr/share/shadowsocksr/delservers.sh > /tmp/subupdate.log 2>&1 &")
|
||||||
|
luci.sys.call("sleep 3")
|
||||||
|
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
|
||||||
|
end
|
||||||
|
|
||||||
-- [[ Servers Manage ]]--
|
-- [[ Servers Manage ]]--
|
||||||
s = m:section(TypedSection, "servers")
|
s = m:section(TypedSection, "servers")
|
||||||
|
@ -451,3 +451,7 @@ msgstr "游戏模式UDP中继"
|
|||||||
|
|
||||||
msgid "Server failsafe auto swith settings"
|
msgid "Server failsafe auto swith settings"
|
||||||
msgstr "服务器节点故障自动切换设置"
|
msgstr "服务器节点故障自动切换设置"
|
||||||
|
|
||||||
|
msgid "Delete all severs"
|
||||||
|
msgstr "删除所有服务器"
|
||||||
|
|
||||||
|
9
package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/delservers.sh
Executable file
9
package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/delservers.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for((i=1;i<=200;i++));
|
||||||
|
do
|
||||||
|
uci delete shadowsocksr.@servers[$1] >/dev/null 2>&1
|
||||||
|
done
|
||||||
|
uci commit shadowsocksr
|
||||||
|
|
||||||
|
/etc/init.d/shadowsocksr stop
|
Loading…
x
Reference in New Issue
Block a user