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

增加启动和停止服务失败的提醒

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

View File

@ -186,7 +186,10 @@ stopV2ray(){
elif [[ -n "${SERVICE_CMD}" ]] || [[ -f "/etc/init.d/v2ray" ]]; then
${SERVICE_CMD} v2ray stop
fi
return 0
if [[ $? -ne 0 ]]; then
colorEcho ${RED} "Failed to shutdown V2Ray service."
return 2
fi
}
startV2ray(){
@ -200,7 +203,10 @@ startV2ray(){
elif [ -n "${SERVICE_CMD}" ] && [ -f "/etc/init.d/v2ray" ]; then
${SERVICE_CMD} v2ray start
fi
return 0
if [[ $? -ne 0 ]]; then
colorEcho ${RED} "Failed to start V2Ray service."
return 2
fi
}
copyFile() {