From 6c9b96352fb5e7d6acdf8f14ea4f9251cd09926b Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 4 Feb 2021 01:12:08 +0800 Subject: xray-core: add init script Add init script so the users could run it with their configs quickly. Signed-off-by: Tianling Shen --- net/xray-core/Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'net/xray-core/Makefile') diff --git a/net/xray-core/Makefile b/net/xray-core/Makefile index f886985f4..42eb5a48e 100644 --- a/net/xray-core/Makefile +++ b/net/xray-core/Makefile @@ -75,6 +75,11 @@ define Package/xray-geodata/description This includes GEO datas used for xray-core. endef +define Package/xray-core/conffiles +/etc/xray/ +/etc/config/xray +endef + GEOIP_VER:=202101280019 GEOIP_FILE:=geoip.dat.$(GEOIP_VER) @@ -105,10 +110,20 @@ endef define Package/xray-core/install $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) - $(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray $(LN) xray $(1)/usr/bin/v2ray + + $(INSTALL_DIR) $(1)/etc/xray/ + $(INSTALL_CONF) $(CURDIR)/files/config.json.example $(1)/etc/xray/ + + $(INSTALL_DIR) $(1)/etc/config/ + $(INSTALL_CONF) $(CURDIR)/files/xray.conf $(1)/etc/config/xray + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) $(CURDIR)/files/xray.init $(1)/etc/init.d/xray + + $(INSTALL_DIR) $(1)/etc/capabilities/ + $(INSTALL_DATA) $(CURDIR)/files/xray.capabilities $(1)/etc/capabilities/xray.json endef define Package/xray-example/install -- cgit v1.2.3