1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-10-31 00:08:08 -04:00
v2fly/release/config/systemd/v2ray.service
2018-07-17 13:30:51 +02:00

23 lines
766 B
Desktop File

[Unit]
Description=V2Ray Service
After=network.target
Wants=network.target
[Service]
# This service runs as root. You may consider to run it as another use for security concerns.
# By uncommenting the following two lines, this service will run as user v2ray/v2ray.
# More discussion at https://github.com/v2ray/v2ray-core/issues/1011
# User=v2ray
# Group=v2ray
Type=simple
PIDFile=/var/run/v2ray.pid
ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json
Restart=on-failure
RestartPreventExitStatus=23 # Configuration error
# After unexpected exit, upload latest V2Ray log to official log service for future analysis.
# Comment out the following line if you have privacy concerns.
ExecStopPost=/usr/bin/v2ray/upload.sh
[Install]
WantedBy=multi-user.target