Skip to content

Commit 3a8c30d

Browse files
authored
Merge pull request v2fly#31 from v2fly/develop
fix: Changed from pgrep to pidof
2 parents 828c8b2 + 823d8b6 commit 3a8c30d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install-release.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ check_update() {
424424
}
425425

426426
remove_v2ray() {
427-
if [[ -f '/etc/systemd/system/v2ray.service' ]]; then
428-
if [[ -n "$(pgrep v2ray)" ]]; then
427+
if [[ -n "$(systemctl list-unit-files | grep 'v2ray')" ]]; then
428+
if [[ -n "$(pidof v2ray)" ]]; then
429429
stop_v2ray
430430
fi
431431
NAME="$1"
@@ -514,7 +514,7 @@ main() {
514514

515515
# Determine if V2Ray is running
516516
if [[ -n "$(systemctl list-unit-files | grep 'v2ray')" ]]; then
517-
if [[ -n "$(pgrep v2ray)" ]]; then
517+
if [[ -n "$(pidof v2ray)" ]]; then
518518
stop_v2ray
519519
V2RAY_RUNNING='1'
520520
fi

0 commit comments

Comments
 (0)