update
This commit is contained in:
parent
d712af249b
commit
80e3e3f1a6
@ -19,9 +19,15 @@ update_domain(){
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 修改域名
|
# 修改server_name
|
||||||
modify_json_file "$config_file" ".inbounds[0].tls.server_name" "$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.domains[0]" "$domain"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "修改域名成功"
|
echo "修改域名成功"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user