From d786db597df4aa3dd8e897335050a70c9ccb82e0 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Tue, 3 Mar 2020 14:32:34 +0800 Subject: [PATCH] luci-app-v2ray-server: fix v2ray server killed by ssr plus --- package/lean/luci-app-v2ray-server/Makefile | 2 +- .../lean/luci-app-v2ray-server/root/etc/init.d/v2ray_server | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-v2ray-server/Makefile b/package/lean/luci-app-v2ray-server/Makefile index a536729335..dbdae4d037 100644 --- a/package/lean/luci-app-v2ray-server/Makefile +++ b/package/lean/luci-app-v2ray-server/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for V2ray Server LUCI_DEPENDS:=+v2ray LUCI_PKGARCH:=all PKG_VERSION:=1.1 -PKG_RELEASE:=3 +PKG_RELEASE:=5 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-v2ray-server/root/etc/init.d/v2ray_server b/package/lean/luci-app-v2ray-server/root/etc/init.d/v2ray_server index 1c4d6622ea..86a8e043af 100755 --- a/package/lean/luci-app-v2ray-server/root/etc/init.d/v2ray_server +++ b/package/lean/luci-app-v2ray-server/root/etc/init.d/v2ray_server @@ -20,7 +20,8 @@ gen_v2ray_config_file() { config_get transport $1 transport lua /usr/lib/lua/luci/model/cbi/v2ray_server/api/genv2rayconfig.lua $1 > $CONFIG_PATH/$1.json echolog "$remarks $port 生成并运行 V2ray 配置文件 - $CONFIG_PATH/$1.json" - /usr/bin/v2ray/v2ray -config $CONFIG_PATH/$1.json >/dev/null 2>&1 & + [ -f /var/v2server ] || cp -a /usr/bin/v2ray/v2ray /var/v2server + /var/v2server -config $CONFIG_PATH/$1.json >/dev/null 2>&1 & } start_v2ray_server() {