From 73a6dd2111bdef0963f4a8e28dcc261d99c2dc3e Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Wed, 31 Dec 2025 09:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81,=20?= =?UTF-8?q?=E6=8A=BD=E5=8F=96=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/run.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/run.sh b/bin/run.sh index ca7f87f..e27e79b 100644 --- a/bin/run.sh +++ b/bin/run.sh @@ -14,11 +14,12 @@ run() { check_bash_installed # 如果配置没有创建 - if [ ! -e "$config_dir/config.json" ]; then - touch "$config_dir/config.json" + local config_file="$config_dir/config.json" + if [ ! -e "$config_file" ]; then + touch "$config_file" fi - local password=$(jq -r '.inbounds[0].users[0].password' "$config_dir/config.json") - if [ ! -s "$config_dir/config.json" ] || [ "$password" = "你的密码" ]; then + local password=$(jq -r '.inbounds[0].users[0].password' "$config_file") + if [ ! -s "$config_file" ] || [ "$password" = "你的密码" ]; then bash "$script_dir/create_config.sh" # 创建配置 fi