Merge pull request #2091 from unknowndev233/master

v2ray.service upgrade
pull/2272/head
Kslr 2020-02-19 03:20:45 +08:00 committed by GitHub
commit 175218b7f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 9 deletions

View File

@ -1,16 +1,20 @@
[Unit] [Unit]
Description=V2Ray Service Description=V2Ray - A unified platform for anti-censorship.
After=network.target Documentation=https://v2ray.com
Wants=network.target After=network.target nss-lookup.target
Wants=network-online.target
[Service] [Service]
# This service runs as root. You may consider to run it as another user for security concerns. # If the version of systemd is 240 or above, then uncommenting Type=simple and commenting out Type=exec
# By uncommenting the following two lines, this service will run as user v2ray/v2ray. #Type=exec
# More discussion at https://github.com/v2ray/v2ray-core/issues/1011
# User=v2ray
# Group=v2ray
Type=simple Type=simple
PIDFile=/run/v2ray.pid # Runs as a root or add CAP_NET_BIND_SERVICE ability can bind 1 to 1024 port.
# This service runs as root. You may consider to run it as another user for security concerns.
# By uncommenting User=v2ray and commenting out User=root, the service will run as user v2ray.
# More discussion at https://github.com/v2ray/v2ray-core/issues/1011
User=root
#User=v2ray
#AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json
Restart=on-failure Restart=on-failure
# Don't restart in the case of configuration error # Don't restart in the case of configuration error