root@hi3798mv100:~# install-v2ray.sh
info: Installing V2Ray v5.1.0 for armv7l
Downloading V2Ray archive: https://git.histb.com/v2fly/v2ray-core/releases/download/v5.1.0/v2ray-linux-arm32-v7a.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.0M 100 10.0M 0 0 340k 0 0:00:30 0:00:30 --:--:-- 259k
Downloading verification file for V2Ray archive: https://git.histb.com/v2fly/v2ray-core/releases/download/v5.1.0/v2ray-linux-arm32-v7a.zip.dgst
info: Extract the V2Ray package to /tmp/tmp.EJpKfZWhSD and prepare it for installation.
install: cannot stat '/tmp/tmp.EJpKfZWhSD/v2ctl': No such file or directory
info: Systemd service files have been installed successfully!
warning: The following are the actual parameters for the v2ray service startup.
warning: Please make sure the configuration file path is correctly set.
/etc/systemd/system/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 run -config /usr/local/etc/v2ray/config.json
Restart=on-failure
RestartPreventExitStatus=23
[Install]
WantedBy=multi-user.target
/etc/systemd/system/v2ray.service.d/10-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.
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json
installed: /usr/local/bin/v2ray
installed: /usr/local/bin/v2ctl
installed: /usr/local/share/v2ray/geoip.dat
installed: /usr/local/share/v2ray/geosite.dat
installed: /usr/local/etc/v2ray/config.json
installed: /var/log/v2ray/
installed: /var/log/v2ray/access.log
installed: /var/log/v2ray/error.log
installed: /etc/systemd/system/v2ray.service
installed: /etc/systemd/system/v2ray@.service
removed: /tmp/tmp.EJpKfZWhSD
info: V2Ray v5.1.0 is installed.
You may need to execute a command to remove dependent software: apt purge curl unzip
Created symlink /etc/systemd/system/multi-user.target.wants/v2ray.service → /etc/systemd/system/v2ray.service.
root@hi3798mv100:~#
root@hi3798mv100:~# systemctl status v2ray
● v2ray.service - V2Ray Service
Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/v2ray.service.d
└─10-donot_touch_single_conf.conf
Active: failed (Result: exit-code) since Sun 2022-10-16 00:44:54 CST; 3min 44s ago
Docs: https://www.v2fly.org/
Process: 25048 ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json (code=exited, status=2)
Main PID: 25048 (code=exited, status=2)
Oct 16 00:44:54 hi3798mv100 systemd[1]: v2ray.service: Scheduled restart job, restart counter is at 5.
Oct 16 00:44:54 hi3798mv100 systemd[1]: Stopped V2Ray Service.
Oct 16 00:44:54 hi3798mv100 systemd[1]: v2ray.service: Start request repeated too quickly.
Oct 16 00:44:54 hi3798mv100 systemd[1]: v2ray.service: Failed with result 'exit-code'.
Oct 16 00:44:54 hi3798mv100 systemd[1]: Failed to start V2Ray Service.
root@hi3798mv100:~#