Update Install.sh

This commit is contained in:
TinrLin 2023-10-09 12:51:54 +08:00 committed by GitHub
parent 4002d1875e
commit e379fbd381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1891,7 +1891,7 @@ function generate_tls_config() {
function extract_tls_info() {
local config_file="/usr/local/etc/sing-box/config.json"
local tls_info_file="/usr/local/etc/sing-box/tls_info.json"
jq '[.inbounds[].tls | {server_name: .server_name, certificate_path: .certificate_path, key_path: .key_path}]' "$config_file" > "$tls_info_file"
jq '.inbounds[].tls | select(.server_name and .certificate_path and .key_path) | {server_name: .server_name, certificate_path: .certificate_path, key_path: .key_path}' "$config_file" | jq -s 'unique' > "$tls_info_file"
}
function extract_variables_and_cleanup() {