fhs-install-v2ray
fhs-install-v2ray copied to clipboard
[Announce] runit and OpenRC support have landed, please help testing!
Simple story, I asked for users whose system has these init implements come and help to extend the supported OS of this project, no one showed up. I had bored of waiting. So I self have become a user of void linux and Alpine. Though I do not build considerable time on those systems, and the new script is very likely to hold several problems. I do feel an urge to post this script this very week, as it might be helpful to someone who is facing nasty problems.
https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/develop/for-system-not-using-systemd.sh
Does not have time to test it. Please have a look. @RrrrrCcccc
https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/develop/for-system-not-using-systemd.sh
Does not have time to test it. Please have a look. @RrrrrCcccc
非常感谢能抽时间写这个脚本,正在准备测试一下,遇到点问题,希望能给点意见:
https://github.com/v2fly/fhs-install-v2ray/wiki/Migrate-from-the-old-script-to-this
中提到,先用systemctl disable v2ray.service --now 停止V2Ray服务,
请问,在没有systemd的情况下,该如何停止V2Ray服务?
service v2ray stop 行吗?
非常感谢
https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/develop/for-system-not-using-systemd.sh
Does not have time to test it. Please have a look. @RrrrrCcccc
非常感谢能抽时间写这个脚本,正在准备测试一下,遇到点问题,希望能给点意见:
https://github.com/v2fly/fhs-install-v2ray/wiki/Migrate-from-the-old-script-to-this 中提到,先用
systemctl disable v2ray.service --now停止V2Ray服务,请问,在没有systemd的情况下,该如何停止V2Ray服务?
service v2ray stop行吗?非常感谢
取决于你系统所采用的 init 实现,如果是 OpenRC 的话可以这样做。
BTW 我稍微解释下这个脚本,为了稍微改善下在国内使用脚本的困难,我改成了下载脚本文件到本地,从本地执行的模式。
所以第一你需要下载脚本文件,移动到 /usr/local/share/v2ray 目录。第二执行脚本如果遇到需要更新脚本的情况,第一遍脚本更新完自身后便会退出,需要再执行一次。
https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/develop/for-system-not-using-systemd.sh Does not have time to test it. Please have a look. @RrrrrCcccc
非常感谢能抽时间写这个脚本,正在准备测试一下,遇到点问题,希望能给点意见: https://github.com/v2fly/fhs-install-v2ray/wiki/Migrate-from-the-old-script-to-this 中提到,先用
systemctl disable v2ray.service --now停止V2Ray服务, 请问,在没有systemd的情况下,该如何停止V2Ray服务?service v2ray stop行吗? 非常感谢取决于你系统所采用的 init 实现,如果是 OpenRC 的话可以这样做。
BTW 我稍微解释下这个脚本,为了稍微改善下在国内使用脚本的困难,我改成了下载脚本文件到本地,从本地执行的模式。 所以第一你需要下载脚本文件,移动到
/usr/local/share/v2ray目录。第二执行脚本如果遇到需要更新脚本的情况,第一遍脚本更新完自身后便会退出,需要再执行一次。
尝试1:
root@ubnt:/home/ubnt# bash <(curl -L -k https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/develop/for-system-not-using-systemd.sh)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 858 100 858 0 0 3300 0 --:--:-- --:--:-- --:--:-- 3404
/dev/fd/63: line 2: syntax error near unexpected token `newline'
/dev/fd/63: line 2: ` <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
root@ubnt:/home/ubnt#
尝试2:
root@ubnt:/home/ubnt# curl -L -k https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/develop/for-system-not-using-systemd.sh -o /usr/local/share/v2ray/for-system-not-using-systemd.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 858 100 858 0 0 3198 0 --:--:-- --:--:-- --:--:-- 3300
root@ubnt:/home/ubnt# ls /usr/local/share/v2ray/
for-system-not-using-systemd.sh
root@ubnt:/home/ubnt# bash /usr/local/share/v2ray/for-system-not-using-systemd.sh --local /tmp/v2ray-linux-mips32le.zip
/usr/local/share/v2ray/for-system-not-using-systemd.sh: line 2: syntax error near unexpected token `newline'
/usr/local/share/v2ray/for-system-not-using-systemd.sh: line 2: ` <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
root@ubnt:/home/ubnt#
尝试3:用浏览器下载for-system-not-using-systemd.sh,上传到/tmp/后
bash /tmp/for-system-not-using-systemd.sh --local /tmp/v2ray-linux-mips32le.zip
root@ubnt:/home/ubnt# bash /tmp/for-system-not-using-systemd.sh --local /tmp/v2ray-linux-mips32le.zip
curl: option --retry-connrefused: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
sed: can't read /usr/local/share/v2ray/for-system-not-using-systemd: No such file or directory
curl: option --retry-connrefused: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
curl: option --retry-connrefused: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
sed: can't read /usr/local/share/v2ray/for-system-not-using-systemd.tmp: No such file or directory
dos2unix: can't open '/usr/local/share/v2ray/for-system-not-using-systemd.tmp': No such file or directory
error: The init implementation may not be supported yet.
尝试3:用浏览器下载for-system-not-using-systemd.sh,上传到/tmp/后
bash /tmp/for-system-not-using-systemd.sh --local /tmp/v2ray-linux-mips32le.ziproot@ubnt:/home/ubnt# bash /tmp/for-system-not-using-systemd.sh --local /tmp/v2ray-linux-mips32le.zip curl: option --retry-connrefused: is unknown curl: try 'curl --help' or 'curl --manual' for more information sed: can't read /usr/local/share/v2ray/for-system-not-using-systemd: No such file or directory curl: option --retry-connrefused: is unknown curl: try 'curl --help' or 'curl --manual' for more information curl: option --retry-connrefused: is unknown curl: try 'curl --help' or 'curl --manual' for more information sed: can't read /usr/local/share/v2ray/for-system-not-using-systemd.tmp: No such file or directory dos2unix: can't open '/usr/local/share/v2ray/for-system-not-using-systemd.tmp': No such file or directory error: The init implementation may not be supported yet.
你可以试试执行下面两条命令,看看回显。如果为空表示你系统上不存在这两个工具中的任一个。 而正如 issue 标题写的那样,这个脚本只是为了在 systemd 的基础上增加对 OpenRC 或 runit 的支持。 如果你的系统这三种 init 实现都没有,我暂时是帮不到你的。 如果最后发现真的是这种情况(排除你没有安装/卸载过上述三种软件之类的情况),那你只有两个选择:
- 换一个主流的 Linux 发行版。
- 给出完整的发行版信息,包括名称、版本等等。期待有人用过/感兴趣入手替你完成相应功能的开发。
type -P sv
type -P rc-update

我个人强烈建议你先排除掉自己没安装服务管理的情况,然后考虑换一个主流的 Linux 发行版。 在我的认知范围(以及资料可以简单查到的程度内),systemd + OpenRC + runit 已经足够覆盖几乎所有现代 Linux 发行版了。
搜了一下发现你这是在路由器上搞……本项目并不适合路由器的魔改系统运行。
分享你的问题给群友后发现 openwrt 可能适配你在用的设备,配合 https://github.com/kuoruan/openwrt-v2ray 应该是一个选择。 或者也可以选择 docker 运行,这点是写在 README 上了的。
搜了一下发现你这是在路由器上搞……本项目并不适合路由器的魔改系统运行。
分享你的问题给群友后发现 openwrt 可能适配你在用的设备,配合 https://github.com/kuoruan/openwrt-v2ray 应该是一个选择。 或者也可以选择 docker 运行,这点是写在 README 上了的。
首先非常感谢您为我的问题所付出的时间和精力!
这台路由器上的魔改系统确实造成了不小的困扰,原来的go.sh脚本就无法正确的识别指令集,明明是mipsle,但会误导脚本识别成mips,不过这个可以用--local参数解决,也能装上,不耽误用。
这次是想着更新下v2ray的版本,才会引出这一系列问题。
今天尝试了“笨”办法,好在备份过/etc/init.d/v2ray,下载安装包、手动解压缩、复制文件、恢复/etc/init.d/v2ray以后,已经用上更新过的版本了,我也就满足了。
我在这里的comment好像都可以按off-topic处理了 :-)
再次感谢!
For openrc init script support, you may refer to https://github.com/microcai/gentoo-zh/blob/master/net-proxy/v2ray/files/v2ray.initd