From 95b8be93c3f3cfa1293d7cbcd33e71ba8c580494 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sun, 5 Nov 2017 20:12:40 +0100 Subject: [PATCH] exit on mandatory files only --- release/install-release.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/release/install-release.sh b/release/install-release.sh index 5ead29c56..e2564ead0 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -193,10 +193,13 @@ startV2ray(){ copyFile() { NAME=$1 + MANDATE=$2 ERROR=`cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/${NAME}" "/usr/bin/v2ray/${NAME}"` if [[ $? -ne 0 ]]; then - colorEcho ${YELLOW} "${ERROR}" - exit + colorEcho ${YELLOW} "${ERROR}" + if [ "$MANDATE" = true ]; then + exit + fi fi } @@ -207,11 +210,12 @@ makeExecutable() { installV2Ray(){ # Install V2Ray binary to /usr/bin/v2ray mkdir -p /usr/bin/v2ray - copyFile v2ray + copyFile v2ray true makeExecutable v2ray - copyFile v2ctl + copyFile v2ctl false makeExecutable v2ctl - copyFile geoip.dat + copyFile geoip.dat false + copyFile geosite.dat false # Install V2Ray server config to /etc/v2ray mkdir -p /etc/v2ray