重构代码
This commit is contained in:
+2
-3
@@ -77,9 +77,8 @@ ask_update_domain(){
|
||||
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.domain[0]" "$DOMAIN"
|
||||
if is_config_use_acme "$CONFIG_FILE"; then
|
||||
update_acme_domain "$CONFIG_FILE" "$DOMAIN"
|
||||
fi
|
||||
|
||||
echo "修改域名成功"
|
||||
|
||||
Reference in New Issue
Block a user