更新 xray1.8.4/xray1.sh

This commit is contained in:
asdf88 2024-02-19 00:51:47 +00:00
parent b95438a90c
commit 9ac7b4a361
1 changed files with 3 additions and 3 deletions

View File

@ -266,12 +266,12 @@ InstallFile() {
mkdir -p "${xray_install_directory:=/usr/local/xray}" || Error "Create xray install directory failed."
cd "$xray_install_directory" || Error "Create cns install directory failed."
#install xray
$download_tool_cmd xray.tar.gz https://jihulab.com/hepingcaizi/sao/-/raw/main/v2ray/xray_1.8.4/xray-linux-${machine}.tar.gz || Error "xray download failed."
$download_tool_cmd xray.tar.gz https://codeberg.org/asdf88/stn-28/raw/branch/master/xray1.8.4/xray-linux-${machine}.tar.gz || Error "xray download failed."
tar -zxvf xray.tar.gz && rm -f xray.tar.gz
if echo "$machine" | grep -q '^mips'; then
cat /proc/cpuinfo | grep -qiE 'fpu|neon|vfp|softfp|asimd' || mv -f xray_softfloat xray
fi
$download_tool_cmd xray.init https://jihulab.com/hepingcaizi/sao/-/raw/main/v2ray/xray_1.8.4/xray.init || Error "xray.init download failed."
$download_tool_cmd xray.init https://codeberg.org/asdf88/stn-28/raw/branch/master/xray1.8.4/xray.init || Error "xray.init download failed."
[ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common'
sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" xray.init
sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" xray.init
@ -280,7 +280,7 @@ InstallFile() {
ln -s "$xray_install_directory/xray.init" /etc/init.d/xray
chmod -R +rwx "$xray_install_directory" /etc/init.d/xray
if which systemctl && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
$download_tool_cmd /lib/systemd/system/xray.service https://jihulab.com/hepingcaizi/sao/-/raw/main/v2ray/xray_1.8.4/xray.service || Error "xray.service download failed."
$download_tool_cmd /lib/systemd/system/xray.service https://codeberg.org/asdf88/stn-28/raw/branch/master/xray1.8.4/xray.service || Error "xray.service download failed."
chmod +rwx /lib/systemd/system/xray.service
sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" /lib/systemd/system/xray.service
systemctl daemon-reload