编辑文件 xray.sh
This commit is contained in:
+3
-3
@@ -267,8 +267,8 @@ InstallFile() {
|
|||||||
mkdir -p "${xray_install_directory:=/usr/local/xray}" || Error "Create xray install directory failed."
|
mkdir -p "${xray_install_directory:=/usr/local/xray}" || Error "Create xray install directory failed."
|
||||||
cd "$xray_install_directory" || Error "Create cns install directory failed."
|
cd "$xray_install_directory" || Error "Create cns install directory failed."
|
||||||
#install xray
|
#install xray
|
||||||
$download_tool_cmd xray https://git.dihe.moe/dongge/cns_xbl/raw/branch/main/xray/${xray_UPX}/${machine}${softfloat} || Error "xray download failed."
|
$download_tool_cmd xray https://cnb.cool/dg2025-08/Cax/-/git/raw/main/xray/${xray_UPX}/${machine}${softfloat} || Error "xray download failed."
|
||||||
$download_tool_cmd xray.init https://git.dihe.moe/dongge/cns_xbl/raw/branch/main/xray/xray.init || Error "xray.init download failed."
|
$download_tool_cmd xray.init https://cnb.cool/dg2025-08/Cax/-/git/raw/main/xray/xray.init || Error "xray.init download failed."
|
||||||
[ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common'
|
[ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common'
|
||||||
sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" xray.init
|
sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" xray.init
|
||||||
sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" xray.init
|
sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" xray.init
|
||||||
@@ -277,7 +277,7 @@ InstallFile() {
|
|||||||
ln -s "$xray_install_directory/xray.init" /etc/init.d/Xray
|
ln -s "$xray_install_directory/xray.init" /etc/init.d/Xray
|
||||||
chmod -R +rwx "$xray_install_directory" /etc/init.d/Xray
|
chmod -R +rwx "$xray_install_directory" /etc/init.d/Xray
|
||||||
if which systemctl &>/dev/null && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
if which systemctl &>/dev/null && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
||||||
$download_tool_cmd /lib/systemd/system/xray.service https://git.dihe.moe/dongge/cns_xbl/raw/branch/main/xray/xray.service || Error "xray.service download failed."
|
$download_tool_cmd /lib/systemd/system/xray.service https://cnb.cool/dg2025-08/Cax/-/git/raw/main/xray/xray.service || Error "xray.service download failed."
|
||||||
chmod +rwx /lib/systemd/system/xray.service
|
chmod +rwx /lib/systemd/system/xray.service
|
||||||
sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" /lib/systemd/system/xray.service
|
sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" /lib/systemd/system/xray.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|||||||
Reference in New Issue
Block a user