minor adjustmentsand fixes to ssl manager

main
Anthony 2025-08-20 00:31:19 +08:00
parent 0bb56cd8d2
commit 6d125d46e3
1 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ on_exit() {
fi fi
exit $SCRIPT_EXIT_STATUS exit $SCRIPT_EXIT_STATUS
} }
trap 'on_exit' EXIT trap 'rc=$?; SCRIPT_EXIT_STATUS=$rc; on_exit' EXIT
check_command() { check_command() {
local cmd="$1" local cmd="$1"
@ -208,7 +208,7 @@ update_httpd_config() {
cat <<EOF | sudo tee "$vhconf_file" >/dev/null cat <<EOF | sudo tee "$vhconf_file" >/dev/null
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<virtualHostConfig> <virtualHostConfig>
<docRoot>$VH_ROOT/ROOT/</docRoot> <docRoot>\$VH_ROOT/ROOT/</docRoot>
<enableGzip>1</enableGzip> <enableGzip>1</enableGzip>
<vhssl> <vhssl>
<keyFile>/etc/letsencrypt/live/$domain/privkey.pem</keyFile> <keyFile>/etc/letsencrypt/live/$domain/privkey.pem</keyFile>
@ -255,7 +255,7 @@ EOF
local https6_listener_exists local https6_listener_exists
https6_listener_exists=$(xmlstarlet sel -t -v "/httpServerConfig/listenerList/listener[name='HTTPS-ipv6']/name" "$CONF_FILE" 2>/dev/null || true) https6_listener_exists=$(xmlstarlet sel -t -v "/httpServerConfig/listenerList/listener[name='HTTPS-ipv6']/name" "$CONF_FILE" 2>/dev/null || true)
if [[ -z "$https_listener_exists" ]]; then if [[ -z "$https_listener_exists" ]]; then
log_error "HTTPS listener not found in $CONF_FILE. Cannot proceed with SNI mapping." log_error "HTTPS listener not found in $CONF_FILE. Cannot proceed with SNI mapping."git add
SCRIPT_EXIT_STATUS=1; return 1 SCRIPT_EXIT_STATUS=1; return 1
fi fi