Skip to content

Commit

Permalink
fix: Incorrect execution of stop_v2ray function
Browse files Browse the repository at this point in the history
1. In the first installation, if there happens to be a V2Ray service that is not managed by systemd, or if there is a judgment error, the stop_v2ray function will be executed incorrectly, which will cause the installation to fail.

issue #29
  • Loading branch information
dctxmei committed Jul 26, 2020
1 parent b09dd49 commit d72aa48
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,11 @@ main() {
fi

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

0 comments on commit d72aa48

Please sign in to comment.