Replies: 14 comments 1 reply
-
a). 尽管对于所有安装场景,本项目都会添加 drop-in 配置,但这个配置在用户没有设置环境变量进行自定义时,是和发行版包文件里内容一致的。 fhs-install-v2ray/install-release.sh Lines 356 to 380 in 804e5e3 cons on a): 如果更新不及时,就会给不打算自定义安装参数的用户带去困扰。 |
Beta Was this translation helpful? Give feedback.
-
如果是为了提示,为什么不直接把 systemd 文件打印出来呢 |
Beta Was this translation helpful? Give feedback.
-
你说到 systemd 配置应该和其他发行版包文件保持一致,其实这里是做到了的才对。 |
Beta Was this translation helpful? Give feedback.
-
你再往下面多读几行…… |
Beta Was this translation helpful? Give feedback.
-
我认为应该停止更新已经存在的 systemd 配置。 |
Beta Was this translation helpful? Give feedback.
-
参考包管理器的做法嘛 apt 是问你要不要覆盖,pacman 是写到 .pacnew 文件里去。脚本跑到一半问用户个问题 |
Beta Was this translation helpful? Give feedback.
-
I support either asking permission to overwrite or not overwriting at all. In fact, I don't know any other Linux software that overwrites config files already changed by user. Also, the "hint for users" in its current form doesn't make any sense. I've read it over and over and still can't figure out what "Duplicate this file in the same directory and make your customizes there" means. Which directory is the "same directory"? How can you ever duplicate a file in the same directory (under the same file name)? |
Beta Was this translation helpful? Give feedback.
-
能否加一个 --keep-service-file 参数,当带有这个参数运行的时候会跳过install_startup_service_file() 这个函数? |
Beta Was this translation helpful? Give feedback.
-
可。 |
Beta Was this translation helpful? Give feedback.
-
I still think the install script should act the way all (or at least most) install script on Linux do:
|
Beta Was this translation helpful? Give feedback.
-
It is not as simple as you think. |
Beta Was this translation helpful? Give feedback.
-
反正我每次更新前,都把先找出我之前修改好的v2ray.service [Unit]
Description=V2Ray Service
Documentation=https://www.v2fly.org/
After=network.target nss-lookup.target
[Service]
User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/local/bin/v2ray -confdir /usr/local/etc/v2ray/
Restart=on-failure
RestartPreventExitStatus=23
[Install]
WantedBy=multi-user.target 用这个脚本安装后,我马上去修改v2ray.service文件,把我自己的配置覆盖上去,并且把service.d中的那个donot_touch_single_conf.conf文件添加一个.bak,意思就是我不用它。另外我也希望,重复安装(其实就是为了更新)时,不要覆盖我之前的文件,不然每次我都要去修改。 可能我linux不太熟悉吧,我一直不太清楚添加了
我打开两个文件看内容都是一样的,就算之前没有service.d的时候,也是有 v2ray.service和 v2ray@.service,有人能解释一下吗?这个 另外,关于donot_touch_single_conf.conf文件的问题 # In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there.
# Or all changes you made will be lost! # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/%i.json 这个 ExecStart=/usr/local/bin/v2ray -confdir /usr/local/etc/v2ray/ |
Beta Was this translation helpful? Give feedback.
-
你这里面抛的问题很多都可以自己上网查到,你直接拿过来问我是浪费我的时间。我很感谢你愿意参与到项目发展中,提出你自己的意见,但是你需要珍惜其他人的时间,这是一种尊重。 |
Beta Was this translation helpful? Give feedback.
-
Maybe we could add EnvironmentFile at service@v2fly/v2ray-core#2125 |
Beta Was this translation helpful? Give feedback.
-
systemd 配置应该和其他发行版包文件保持一致,如果有修改应该讨论统一修改
Beta Was this translation helpful? Give feedback.
All reactions