1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 22:36:12 -04:00

copyFile功能简化

This commit is contained in:
sunshineplan 2018-04-12 13:12:12 +08:00
parent a06078ecb3
commit a0fd5ba056

View File

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