From 9a9be8cd5617773c8c42b296eeb6433ba9d33921 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sat, 10 Nov 2018 15:19:51 +0800 Subject: [PATCH] fix ss as main server status detection in ssr plus --- package/lean/luci-app-ssr-plus/Makefile | 2 +- .../lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua | 2 +- .../luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index c8b60cde0..4555ac258 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SSR Plus LUCI_DEPENDS:=+shadowsocksr-libev-alt +shadowsocks-libev-ss-redir +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget LUCI_PKGARCH:=all PKG_VERSION:=1 -PKG_RELEASE:=35 +PKG_RELEASE:=36 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua index 86a6a1788..3b04d1853 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua @@ -39,7 +39,7 @@ end function act_status() local e={} - e.running=luci.sys.call("pgrep ssr-redir >/dev/null")==0 + e.running=luci.sys.call("ps -w | grep ssr-retcp | grep -v grep >/dev/null")==0 luci.http.prepare_content("application/json") luci.http.write_json(e) end diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua index 0e3e2293e..785216989 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua @@ -66,7 +66,7 @@ end end -if luci.sys.call("pidof ssr-redir >/dev/null") == 0 then +if luci.sys.call("ps -w | grep ssr-retcp | grep -v grep >/dev/null") == 0 then redir_run=1 end