Commit Graph

4 Commits

Author SHA1 Message Date
Your Name a025d627b7 增强setup-bind.sh: 添加配置验证和错误路径警告 2026-08-07 11:54:20 +08:00
Your Name 948d4cff9a 修复3个问题: 1) setup-bind.sh确保服务启动 2) DNSSEC配置验证options块包裹 3) 添加IPv6开关功能 2026-08-07 11:31:23 +08:00
Your Name e20e235a1e feat: one-click deploy.sh (system deps + venv + DB + systemd)
scripts/deploy.sh covers the full path from fresh OS to running service:
  1. install system packages (apt/yum/dnf auto-detect, includes bind/python3/venv/git)
  2. create Python venv + pip install -r requirements.txt (avoids PEP 668)
  3. init SQLite DB (default admin/admin)
  4. delegate BIND config to setup-bind.sh (or --skip-bind)
  5. install + enable systemd unit dns-web (gunicorn, port 5300)
  6. restart + verify (port listen + HTTP 302)

Idempotent; supports --dry-run, --skip-bind, --port, DNS_WEB_PORT/USER/WORKERS.
Type=exec (not Type=notify) because gunicorn 21.x has no sd_notify.
README updated with deploy.sh as recommended path; .gitignore adds venv/.
2026-08-07 11:19:01 +08:00
Hermes 16448d1666 feat: setup-bind.sh one-shot initialization script
新增 scripts/setup-bind.sh,自动探测 Debian/Ubuntu vs RHEL/CentOS
布局(不靠 OS 名 if-elif,靠 /etc/bind vs /etc/named.conf 文件存在性),
执行 5 步:
  1. 装 bind 包(如未装)
  2. 建 zone 目录、设 bind:named 所有权 + 2770
  3. 建 named.conf.local 空文件、640
  4. 确保 named.conf 包含 named.conf.local(如未包含则追加)
  5. systemctl restart named

幂等:每步都先检查当前状态,已配置项跳过、避免破坏现有内容。

支持 --dry-run 模式打印将执行的命令而不真做,便于先审核。

README '安装 Web 应用' 步骤增加 dry-run + 真跑的两行示例。

测试:dev (Debian 12) --dry-run 通过,正确检测 Debian 布局、跳过
已配置步骤。
2026-07-24 17:47:45 +08:00