- smtp3/src/main.cpp: 移除 confs 依赖(fetch_config_from_confs/merge_ini), 扩展 CLI 参数至 16 项(--instance/--log-level/--smtp-port/--code-len 等), 配置优先级改为 CLI > 环境变量 > 默认值 - smtp3/_run.sh: 新增 ../smtp/.env 加载(与 Python smtp_v2.py 共用凭据), 传递 "",移除 sleep 1 - smtp3/src/main.cpp: SmtpClient 添加 SSL_set_tlsext_host_name (SNI) - core/services.yaml: 回退到 smtp (Python),smtp3 待生产验证后切换 - confs/configs/smtp.ini: 已删除(配置迁入 services.yaml CLI args) - README.md: 移除 smtp.ini 表行,更新部署安全约定 - _inst.sh: 新增 inst_module "smtp3"
50 lines
1.1 KiB
Bash
Executable File
50 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
||
set -euo pipefail
|
||
|
||
run_if_exists() {
|
||
local script="$1"
|
||
echo "---- run ${script} ----"
|
||
|
||
if [ -f "$script" ]; then
|
||
bash "$script"
|
||
fi
|
||
}
|
||
|
||
inst_module() {
|
||
local module="$1"
|
||
echo "======== Install ${module} ========"
|
||
|
||
local set_file="./${module}/_set.sh"
|
||
|
||
if [ -f "$set_file" ]; then
|
||
run_if_exists "$set_file"
|
||
return 0
|
||
else
|
||
echo "Failed" >&2
|
||
return 1
|
||
fi
|
||
}
|
||
|
||
inst_module "libth"
|
||
inst_module "libhttp"
|
||
inst_module "libcrypt"
|
||
inst_module "libsqlite3"
|
||
inst_module "libmsg"
|
||
inst_module "liblogc"
|
||
inst_module "gateway"
|
||
inst_module "waf" # waf 在 gateway 之前编译,部署时由 core 先拉起 waf 再拉起 gateway
|
||
inst_module "static"
|
||
inst_module "fsys"
|
||
inst_module "dnfs"
|
||
inst_module "dnfs2"
|
||
inst_module "db"
|
||
inst_module "db2"
|
||
inst_module "smtp"
|
||
inst_module "smtp3"
|
||
inst_module "captcha"
|
||
inst_module "confs"
|
||
inst_module "ai_review" # 需联网拉 chromadb onnx 模型(_fetch_onnx_model.sh 走 ModelScope 镜像)
|
||
inst_module "aibox" # 需 ~/.cert/deepseek.key(见 _setenv.sh)
|
||
inst_module "redirect80" # 80 端口重定向,依赖 ../pymsg
|
||
inst_module "core" # core last
|