xray-core: use `$(INSTALL_DATA)` to install configuration files 15525/head
authorTianling Shen <cnsztl@immortalwrt.org>
Tue, 27 Apr 2021 11:51:57 +0000 (19:51 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Tue, 27 Apr 2021 12:34:22 +0000 (20:34 +0800)
Using `$(INSTALL_CONF)` will cause the program has no access to
configurations file when someone enabled the selinux support.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
net/xray-core/Makefile

index 0db91efa3df989a43568374dc1dbec4f90466ba7..1fac4a3126fd78e24f2cac7be18e795af4966456 100644 (file)
@@ -113,7 +113,7 @@ define Package/xray-core/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray
 
        $(INSTALL_DIR) $(1)/etc/xray/
-       $(INSTALL_CONF) $(CURDIR)/files/config.json.example $(1)/etc/xray/
+       $(INSTALL_DATA) $(CURDIR)/files/config.json.example $(1)/etc/xray/
 
        $(INSTALL_DIR) $(1)/etc/config/
        $(INSTALL_CONF) $(CURDIR)/files/xray.conf $(1)/etc/config/xray
@@ -126,8 +126,8 @@ endef
 
 define Package/xray-example/install
        $(INSTALL_DIR) $(1)/etc/xray/
-       $(INSTALL_CONF) $(CURDIR)/files/vpoint_socks_vmess.json $(1)/etc/xray/
-       $(INSTALL_CONF) $(CURDIR)/files/vpoint_vmess_freedom.json $(1)/etc/xray/
+       $(INSTALL_DATA) $(CURDIR)/files/vpoint_socks_vmess.json $(1)/etc/xray/
+       $(INSTALL_DATA) $(CURDIR)/files/vpoint_vmess_freedom.json $(1)/etc/xray/
 endef
 
 define Package/xray-geodata/install