Closed Tunglies closed 1 month ago
另外之前的服务实现也有点问题,昨天重构了一下,记得删除resource目录,重新check一下,重装服务
使用 verge https://github.com/clash-verge-rev/clash-verge-rev/commit/a49a3f45071be95bef8c2727e7b7a3fe46f08500 和新拉的 service https://github.com/clash-verge-rev/clash-verge-service/releases/download/aarch64-apple-darwin/clash-verge-service 重装服务,仍然没法在 macos 下退出。
clash-verge-service 并没有存在 macos 对 service 的 stop 或者 mihomo 的 kill。
clash-verge-service 作为 root 运行,需要 root 对其 PID 进行 kill 或者用 launchclt stop service, 才能成功杀死 mihomo 进程。在当前运行下,并不是真的杀死,而会被拉起新的 PID service。 而这两种操作方式在主仓中都没有实现
考虑到用户安装时对 install / uninstall / service 的 root 授权,将 mihomo 控制在 service 中实现是合理的。 否则只能在 verge 中 kill / launchctl stop 且必须每一次手动 root 授权。
这一点我在 https://github.com/clash-verge-rev/clash-verge-service/pull/5 实现了。
先别急,内核管理还在重构中,等我弄完了,你再看看是否有没有考虑到的地方,再PR