Skip to content

Commit

Permalink
Merge pull request v2fly#31 from v2fly/develop
Browse files Browse the repository at this point in the history
fix: Changed from pgrep to pidof
  • Loading branch information
dctxmei authored Jul 27, 2020
2 parents 828c8b2 + 823d8b6 commit 3a8c30d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ check_update() {
}

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

# Determine if V2Ray is running
if [[ -n "$(systemctl list-unit-files | grep 'v2ray')" ]]; then
if [[ -n "$(pgrep v2ray)" ]]; then
if [[ -n "$(pidof v2ray)" ]]; then
stop_v2ray
V2RAY_RUNNING='1'
fi
Expand Down

0 comments on commit 3a8c30d

Please sign in to comment.