From 80e3e3f1a643174443875d031238ea486cc2dbd7 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Sat, 10 Jan 2026 21:13:57 +0800 Subject: [PATCH] update --- bin/update_domain.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/update_domain.sh b/bin/update_domain.sh index f8ac7bc..b9ced38 100644 --- a/bin/update_domain.sh +++ b/bin/update_domain.sh @@ -19,9 +19,15 @@ update_domain(){ exit 1 fi - # 修改域名 + # 修改server_name modify_json_file "$config_file" ".inbounds[0].tls.server_name" "$domain" + # 是否存在acme域名, 存在则修改 + local acme_exists=$(jq -r 'has("inbounds") and (.inbounds[0] | has("tls")) and (.inbounds[0].tls | has("acme"))' "$config_file") + if [[ "$acme_exists" == "true" ]]; then + modify_json_file "$config_file" ".inbounds[0].tls.acme.domains[0]" "$domain" + fi + echo "修改域名成功" }