This commit is contained in:
Olia Lisa
2025-11-22 17:08:41 +08:00
parent 774b5955ad
commit 0e9714c3f0
5 changed files with 48 additions and 8 deletions
+1 -2
View File
@@ -5,13 +5,12 @@ config_dir=$(readlink -f "$script_dir/../conf") # 配置文件绝对路径
# 如果配置文件不存在或者空白
if [ ! -e "$config_dir/config.json" ] || [ ! -s "$config_dir/config.json" ] ; then
cp "$config_dir/template/reality_config.json" "$config_dir/config.json"
bash "$script_dir/create_config.sh"
fi
# 如果配置未初始化
uuid=$(jq -r '.inbounds[0].settings.clients[0].id' "$config_dir/config.json")
if [ "$uuid" = "你的UUID" ] || [ -z "$uuid" ]; then
# 执行初始化脚本
echo "正在执行初始化脚本..."
bash "$script_dir/create_config.sh"
fi