将变量改为局部变量
This commit is contained in:
parent
181ac506d5
commit
60165d8252
@ -6,8 +6,8 @@ update_xhttp_path(){
|
|||||||
local config_dir="$script_dir/../conf"
|
local config_dir="$script_dir/../conf"
|
||||||
source $script_dir/utils/jq_util.sh
|
source $script_dir/utils/jq_util.sh
|
||||||
|
|
||||||
path_length="$(( RANDOM % 4 + 8 ))"
|
local path_length="$(( RANDOM % 4 + 8 ))"
|
||||||
xhttp_path="/"$(docker run --rm teddysun/xray:latest xray uuid | tr -d '-' | cut -c 1-$path_length)
|
local xhttp_path="/"$(docker run --rm teddysun/xray:latest xray uuid | tr -d '-' | cut -c 1-$path_length)
|
||||||
|
|
||||||
# 修改config.json的xhttp_path
|
# 修改config.json的xhttp_path
|
||||||
modify_json_file "$config_dir/config.json" ".inbounds[0].streamSettings.xhttpSettings.path" "$xhttp_path"
|
modify_json_file "$config_dir/config.json" ".inbounds[0].streamSettings.xhttpSettings.path" "$xhttp_path"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user