From a0fd5ba05666653d86320fbba4a9d685057cce5a Mon Sep 17 00:00:00 2001 From: sunshineplan Date: Thu, 12 Apr 2018 13:12:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?copyFile=E5=8A=9F=E8=83=BD=E7=AE=80?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release/install-release.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/release/install-release.sh b/release/install-release.sh index d67ed56b3a..eb0fb42cb2 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -205,13 +205,10 @@ startV2ray(){ copyFile() { NAME=$1 - MANDATE=$2 ERROR=`cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/${NAME}" "/usr/bin/v2ray/${NAME}" 2>&1` if [[ $? -ne 0 ]]; then colorEcho ${YELLOW} "${ERROR}" - if [ "$MANDATE" = true ]; then - exit - fi + return 2 fi } @@ -222,12 +219,12 @@ makeExecutable() { installV2Ray(){ # Install V2Ray binary to /usr/bin/v2ray mkdir -p /usr/bin/v2ray - copyFile v2ray true + copyFile v2ray || return $? makeExecutable v2ray - copyFile v2ctl false + copyFile v2ctl makeExecutable v2ctl - copyFile geoip.dat false - copyFile geosite.dat false + copyFile geoip.dat + copyFile geosite.dat # Install V2Ray server config to /etc/v2ray mkdir -p /etc/v2ray From a12ec47cadf5526a4e8b976462292dace79a3891 Mon Sep 17 00:00:00 2001 From: sunshineplan Date: Thu, 12 Apr 2018 14:52:35 +0800 Subject: [PATCH 2/3] Update install-release.sh --- release/install-release.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/install-release.sh b/release/install-release.sh index eb0fb42cb2..c6c743c1dc 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -210,6 +210,7 @@ copyFile() { colorEcho ${YELLOW} "${ERROR}" return 2 fi + return 0 } makeExecutable() { From fe5d3adecc189612027d8363bdf02e55251c9248 Mon Sep 17 00:00:00 2001 From: sunshineplan Date: Thu, 12 Apr 2018 16:03:06 +0800 Subject: [PATCH 3/3] Update install-release.sh --- release/install-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/install-release.sh b/release/install-release.sh index c6c743c1dc..4f3ab01da0 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -386,7 +386,7 @@ main(){ V2RAY_RUNNING=1 stopV2ray fi - installV2Ray + installV2Ray || return $? installInitScript if [[ ${V2RAY_RUNNING} -eq 1 ]];then colorEcho ${BLUE} "Restarting V2Ray service."