2 # Copyright 2022 Gentoo Authors
3 # Distributed under the terms of the GNU General Public License v2
5 USER="${RC_SVCNAME##*.}"
6 HOME="$(eval echo ~${USER})"
7 name="v2rayA for ${USER}"
8 description="A Linux web GUI client of Project V which supports V2Ray, Xray, SS, SSR, Trojan and Pingtunnel"
9 command="/usr/bin/v2raya"
10 command_user="${USER}"
11 command_args="--lite --log-file ${HOME}/.config/v2raya/v2raya.log ${V2RAYA_OPTS}"
12 error_log="${HOME}/.config/v2raya/error.log"
13 pidfile="/run/${RC_SVCNAME}.pid"
14 command_background="yes"
22 if [ "$USER" = "v2raya-user" ]; then
23 eerror "You are not supposed to run this script directly."
24 eerror "Create a symlink for this script:"
25 eerror " ln -s ${RC_SVCNAME} /etc/init.d/${RC_SVCNAME}.<user>"
28 elif [ "$USER" = "root" ]; then
29 eerror "Root user doesn't need to run v2rayA daemon by link."
30 eerror "Instead just run /etc/init.d/v2raya directly."