1. 18 Dec, 2025 8 commits
    • shaw's avatar
      refactor: 使用行业标准方案重构服务重启逻辑 · 8e81e395
      shaw authored
      重构内容:
      - 移除复杂的 sudo systemctl restart 方案
      - 改用 os.Exit(0) + systemd Restart=always 的标准做法
      - 删除 sudoers 配置及相关代码
      - 删除 sub2api-sudoers 文件
      
      优势:
      - 代码从 85+ 行简化到 47 行
      - 无需 sudo 权限配置
      - 无需特殊用户 shell 配置
      - 更简单、更可靠
      - 符合行业最佳实践(Docker/K8s 等均采用此方案)
      
      工作原理:
      - 服务调用 os.Exit(0) 优雅退出
      - systemd 检测到退出后自动重启(Restart=always)
      8e81e395
    • shaw's avatar
      fix: 修复 install.sh 优先使用旧 sudoers 文件的问题 · b66f97c1
      shaw authored
      问题原因:
      - install.sh 优先从 tar.gz 复制 sudoers 文件
      - 旧版 Release 中的 sudoers 文件没有 /usr/bin/systemctl 路径
      - 即使脚本更新了,仍然会使用旧的配置
      
      修复内容:
      - 移除对 tar.gz 中 sudoers 文件的依赖
      - 总是使用脚本中内嵌的最新配置
      - 确保新版脚本立即生效,无需等待新 Release
      b66f97c1
    • shaw's avatar
      fix: 修复 sudoers 中 systemctl 路径不兼容的问题 · b51ad0d8
      shaw authored
      问题原因:
      - sudoers 只配置了 /bin/systemctl 路径
      - 部分系统(如 Ubuntu 22.04+)的 systemctl 位于 /usr/bin/systemctl
      - 路径不匹配导致 sudo 仍然需要密码
      
      修复内容:
      - 同时支持 /bin/systemctl 和 /usr/bin/systemctl 两个路径
      - 兼容 Debian/Ubuntu 和 RHEL/CentOS 等不同发行版
      b51ad0d8
    • shaw's avatar
      fix: 修复服务用户 shell 导致无法执行 sudo 重启的问题 · 4eb22d8e
      shaw authored
      问题原因:
      - 服务用户 sub2api 的 shell 被设置为 /bin/false
      - 导致无法执行 sudo systemctl restart 命令
      - 安装/升级后服务无法自动重启
      
      修复内容:
      - 新安装时使用 /bin/sh 替代 /bin/false
      - 升级时自动检测并修复旧版本用户的 shell 配置
      - 修复失败时给出警告和手动修复命令,不中断安装流程
      4eb22d8e
    • shaw's avatar
      fix: 修复脚本的一些参数问题 · ef3199f0
      shaw authored
      ef3199f0
    • shaw's avatar
      20aee89d
    • shaw's avatar
      fix: add missing deploy/DOCKER.md for Docker workflow · 268f4d28
      shaw authored
      The release workflow references ./deploy/DOCKER.md to update DockerHub
      description, but the file was missing causing ENOENT error.
      268f4d28
    • shaw's avatar
      First commit · 642842c2
      shaw authored
      642842c2