From e842a47ea2e40e10b441683b924a1a4e033fb636 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Mon, 20 Apr 2026 18:06:41 +0800 Subject: [PATCH] fix bug --- bin/update_port.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/update_port.sh b/bin/update_port.sh index 6663964..2d1f6ea 100644 --- a/bin/update_port.sh +++ b/bin/update_port.sh @@ -88,10 +88,10 @@ update_port(){ } ask_update_port(){ - local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # 脚本文件夹路径 + local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" local config_file="$script_dir/../conf/config.json" - local current_port=$(jq -r '.inbounds[0].port' $config_dir/config.json) - local new_port=ask_update "请输入新的端口号" "$current_port" - update_port $new_port -} + local current_port=$(jq -r '.inbounds[0].port' "$config_file") + local new_port=$(ask_update "请输入新的端口号" "$current_port") + update_port "$new_port" +} \ No newline at end of file