windows服务配置

This commit is contained in:
lubeilin
2023-05-28 21:11:47 +08:00
parent 78ae5f3036
commit cf7854906f
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -141,6 +141,7 @@ async fn main() {
let args: Vec<_> = std::env::args().collect();
if args.len() == 3 && args[1] == windows::SERVICE_FLAG {
//以服务的方式启动
config::set_win_server_home(std::path::PathBuf::from(&args[2]));
windows::service::start();
return;
} else {