Update xray.sh
This commit is contained in:
parent
5862db39c2
commit
989324255c
@ -268,7 +268,7 @@ InstallFile() {
|
||||
cd "$xray_install_directory" || Error "Create cns install directory failed."
|
||||
#install xray
|
||||
$download_tool_cmd xray https://github.com/a131878/cns/releases/tag/xray/${xray_UPX}/linux_${machine}${softfloat} || Error "xray download failed."
|
||||
$download_tool_cmd xray.init http://xray.540186.xyz/dxy/xray/xray.init || Error "xray.init download failed."
|
||||
$download_tool_cmd xray.init https://github.com/a131878/cns/blob/main/xray/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
|
||||
@ -277,7 +277,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 &>/dev/null && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
||||
$download_tool_cmd /lib/systemd/system/xray.service http://xray.540186.xyz/dxy/xray/xray.service || Error "xray.service download failed."
|
||||
$download_tool_cmd /lib/systemd/system/xray.service https://github.com/a131878/cns/blob/main/xray/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
|
||||
|
Loading…
x
Reference in New Issue
Block a user