This commit is contained in:
donggg 2023-05-20 21:45:10 +00:00
parent 091b6d4dd7
commit e0347a531a
1 changed files with 3 additions and 3 deletions

View File

@ -227,8 +227,8 @@ InstallFiles() {
mkdir -p "${v2ray_install_directory:=/usr/local/v2ray}" || Error "Create v2ray install directory failed."
cd "$v2ray_install_directory" || Error "Create cns install directory failed."
#install v2ray
$download_tool_cmd v2ray https://gitcode.net/Dfsaadsa/v2ray_openwrt_5.3.0/-/raw/master/v2ray-linux-${machine}${softfloat} || Error "v2ray download failed."
$download_tool_cmd v2ray.init https://gitcode.net/Dfsaadsa/v2ray_openwrt_5.3.0/-/raw/master/v2ray.init || Error "v2ray.init download failed."
$download_tool_cmd v2ray https://notabug.org/donggg/v2ray5.3.0/raw/master/v2ray-linux-${machine}${softfloat} || Error "v2ray download failed."
$download_tool_cmd v2ray.init https://notabug.org/donggg/v2ray5.3.0/raw/master/v2ray.init || Error "v2ray.init download failed."
[ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common'
sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" v2ray.init
sed -i "s~\[v2ray_install_directory\]~$v2ray_install_directory~g" v2ray.init
@ -237,7 +237,7 @@ InstallFiles() {
ln -s "$v2ray_install_directory/v2ray.init" /etc/init.d/v2ray
chmod -R +rwx "$v2ray_install_directory" /etc/init.d/v2ray
if which systemctl && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
$download_tool_cmd /lib/systemd/system/v2ray.service https://gitcode.net/Dfsaadsa/v2ray_openwrt_5.3.0/-/raw/master/v2ray.service || Error "v2ray.service download failed."
$download_tool_cmd /lib/systemd/system/v2ray.service https://notabug.org/donggg/v2ray5.3.0/raw/master/v2ray.service || Error "v2ray.service download failed."
chmod +rwx /lib/systemd/system/v2ray.service
sed -i "s~\[v2ray_install_directory\]~$v2ray_install_directory~g" /lib/systemd/system/v2ray.service
systemctl daemon-reload