重构代码,统一项目入口为install.sh
This commit is contained in:
+1
-4
@@ -77,11 +77,8 @@ find_free_port() {
|
||||
update_port(){
|
||||
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # 脚本文件夹路径
|
||||
local config_file="$script_dir/../conf/config.json"
|
||||
source "$script_dir/utils/jq_util.sh"
|
||||
|
||||
|
||||
local port=$(find_free_port)
|
||||
modify_json_file "$config_file" ".inbounds[0].port" "$port"
|
||||
echo "设置端口成功"
|
||||
}
|
||||
|
||||
update_port
|
||||
|
||||
Reference in New Issue
Block a user