mirror of
https://github.com/jackwener/wx-cli.git
synced 2026-10-09 01:45:46 +00:00
fix(cli,config): 修复 sudo 下初始化失败 + daemon 不重载问题 (#37)
* fix(cli,config): 修复 sudo 下初始化失败 + daemon 不重载问题 - cli/transport: 新增 stop_daemon(),init 后自动停止旧 daemon - config: cli_dir() 优先读 SUDO_USER 环境变量,避免写到 /root/.wx-cli - config: auto_detect_db_dir() 按 .db 文件最新 mtime 排序,正确选最新目录 - daemon/server: dispatch 新增 ReloadConfig 命令(预留) - ipc: Request 新增 ReloadConfig 变体 - scanner/linux: 移除调试日志,清理 unused bail import * fix(config): resolve sudo home via passwd lookup --------- Co-authored-by: cjliu <cjliu@upointech.com> Co-authored-by: jackwener <jakevingoo@gmail.com>
This commit is contained in:
@@ -231,5 +231,8 @@ async fn dispatch(
|
||||
Err(e) => Response::err(e.to_string()),
|
||||
}
|
||||
}
|
||||
ReloadConfig => {
|
||||
Response::ok(serde_json::json!({ "reloading": true }))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user