Merge pull request #31 from v2fly/develop

fix: Changed from pgrep to pidof
pull/64/head
Dct Mei 2020-07-27 01:51:30 +00:00 committed by GitHub
commit 3a8c30db12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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"
@ -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