mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
exit on mandatory files only
This commit is contained in:
parent
e60de73c70
commit
95b8be93c3
@ -193,11 +193,14 @@ startV2ray(){
|
|||||||
|
|
||||||
copyFile() {
|
copyFile() {
|
||||||
NAME=$1
|
NAME=$1
|
||||||
|
MANDATE=$2
|
||||||
ERROR=`cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/${NAME}" "/usr/bin/v2ray/${NAME}"`
|
ERROR=`cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/${NAME}" "/usr/bin/v2ray/${NAME}"`
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
colorEcho ${YELLOW} "${ERROR}"
|
colorEcho ${YELLOW} "${ERROR}"
|
||||||
|
if [ "$MANDATE" = true ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
makeExecutable() {
|
makeExecutable() {
|
||||||
@ -207,11 +210,12 @@ makeExecutable() {
|
|||||||
installV2Ray(){
|
installV2Ray(){
|
||||||
# Install V2Ray binary to /usr/bin/v2ray
|
# Install V2Ray binary to /usr/bin/v2ray
|
||||||
mkdir -p /usr/bin/v2ray
|
mkdir -p /usr/bin/v2ray
|
||||||
copyFile v2ray
|
copyFile v2ray true
|
||||||
makeExecutable v2ray
|
makeExecutable v2ray
|
||||||
copyFile v2ctl
|
copyFile v2ctl false
|
||||||
makeExecutable v2ctl
|
makeExecutable v2ctl
|
||||||
copyFile geoip.dat
|
copyFile geoip.dat false
|
||||||
|
copyFile geosite.dat false
|
||||||
|
|
||||||
# Install V2Ray server config to /etc/v2ray
|
# Install V2Ray server config to /etc/v2ray
|
||||||
mkdir -p /etc/v2ray
|
mkdir -p /etc/v2ray
|
||||||
|
Loading…
Reference in New Issue
Block a user