mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 优化重装时读取不到上一次的配置文件时的提示
parent
4388a8f204
commit
a422f4cd21
|
@ -1639,17 +1639,14 @@ handleXray() {
|
|||
# 获取clients配置
|
||||
getClients() {
|
||||
local path=$1
|
||||
|
||||
local addClientsStatus=$2
|
||||
previousClients=
|
||||
if [[ ${addClientsStatus} == "true" ]]; then
|
||||
if [[ ! -f "${path}" ]]; then
|
||||
echo
|
||||
echoContent yellow "没有读取到此协议上一次安装的配置文件,跳过将采用随机uuid"
|
||||
echo
|
||||
read -r -p "是否跳过 ?[y/n]:" skip
|
||||
if [[ "${skip}" == "n" ]]; then
|
||||
exit
|
||||
fi
|
||||
local protocol=$(echo "${path}" | awk -F "[_]" '{print $2 $3}')
|
||||
echoContent yellow "没有读取到此协议[${protocol}]上一次安装的配置文件,采用配置文件的第一个uuid"
|
||||
else
|
||||
previousClients=$(jq -r ".inbounds[0].settings.clients" "${path}")
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue