From a0fd5ba05666653d86320fbba4a9d685057cce5a Mon Sep 17 00:00:00 2001 From: sunshineplan Date: Thu, 12 Apr 2018 13:12:12 +0800 Subject: [PATCH] =?UTF-8?q?copyFile=E5=8A=9F=E8=83=BD=E7=AE=80=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 d67ed56b3..eb0fb42cb 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