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