This commit is contained in:
parent
091b6d4dd7
commit
e0347a531a
6
v2ray.sh
6
v2ray.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue