fix(脚本): 修改单独安装5时无法删除用户的问题
parent
6f3a69e75f
commit
13c65c9b70
24
install.sh
24
install.sh
|
@ -4519,6 +4519,17 @@ removeUser() {
|
||||||
vlessTcpResult=$(jq -r 'del(.inbounds[0].settings.clients['${delUserIndex}'])' ${configPath}${frontingType}.json)
|
vlessTcpResult=$(jq -r 'del(.inbounds[0].settings.clients['${delUserIndex}'])' ${configPath}${frontingType}.json)
|
||||||
echo "${vlessTcpResult}" | jq . >${configPath}${frontingType}.json
|
echo "${vlessTcpResult}" | jq . >${configPath}${frontingType}.json
|
||||||
fi
|
fi
|
||||||
|
elif [[ -n "${realityStatus}" ]]; then
|
||||||
|
jq -r -c .inbounds[0].settings.clients[].email ${configPath}07_VLESS_vision_reality_inbounds.json | awk '{print NR""":"$0}'
|
||||||
|
read -r -p "请选择要删除的用户编号[仅支持单个删除]:" delUserIndex
|
||||||
|
if [[ $(jq -r '.inbounds[0].settings.clients|length' ${configPath}07_VLESS_vision_reality_inbounds.json) -lt ${delUserIndex} ]]; then
|
||||||
|
echoContent red " ---> 选择错误"
|
||||||
|
else
|
||||||
|
delUserIndex=$((delUserIndex - 1))
|
||||||
|
local vlessRealityResult
|
||||||
|
vlessRealityResult=$(jq -r 'del(.inbounds[0].settings.clients['${delUserIndex}'])' ${configPath}07_VLESS_vision_reality_inbounds.json)
|
||||||
|
echo "${vlessRealityResult}" | jq . >${configPath}07_VLESS_vision_reality_inbounds.json
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n "${delUserIndex}" ]]; then
|
if [[ -n "${delUserIndex}" ]]; then
|
||||||
if echo ${currentInstallProtocolType} | grep -q 1; then
|
if echo ${currentInstallProtocolType} | grep -q 1; then
|
||||||
|
@ -4557,6 +4568,17 @@ removeUser() {
|
||||||
echo "${hysteriaResult}" | jq . >${hysteriaConfigPath}config.json
|
echo "${hysteriaResult}" | jq . >${hysteriaConfigPath}config.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 7; then
|
||||||
|
local vlessRealityResult
|
||||||
|
vlessRealityResult=$(jq -r 'del(.inbounds[0].settings.clients['${delUserIndex}'])' ${configPath}07_VLESS_vision_reality_inbounds.json)
|
||||||
|
echo "${vlessRealityResult}" | jq . >${configPath}07_VLESS_vision_reality_inbounds.json
|
||||||
|
fi
|
||||||
|
if echo ${currentInstallProtocolType} | grep -q 8; then
|
||||||
|
local vlessRealityGRPCResult
|
||||||
|
vlessRealityGRPCResult=$(jq -r 'del(.inbounds[0].settings.clients['${delUserIndex}'])' ${configPath}08_VLESS_reality_fallback_grpc_inbounds.json)
|
||||||
|
echo "${vlessRealityGRPCResult}" | jq . >${configPath}08_VLESS_reality_fallback_grpc_inbounds.json
|
||||||
|
fi
|
||||||
|
|
||||||
reloadCore
|
reloadCore
|
||||||
fi
|
fi
|
||||||
manageAccount 1
|
manageAccount 1
|
||||||
|
@ -6753,7 +6775,7 @@ menu() {
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v2.8.9"
|
echoContent green "当前版本:v2.8.10"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|
Loading…
Reference in New Issue