Skip to content

Commit

Permalink
feat: Implement Windows daemon config
Browse files Browse the repository at this point in the history
  • Loading branch information
DPS0340 committed Jul 1, 2024
1 parent 9da1f75 commit 00efbf0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/executor/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ WantedBy=multi-user.target"#;

#[cfg(target_os = "windows")]
async fn create_daemon_config_if_not_exists(&self) -> Result<(), RRDBError> {
todo!();
let output = Command::new("sc.exe").args(["create", "rrdb", "binpath=", "'C:\Program Files\rrdb\rrdb.exe'"]).output();

self.check_output_status(output)
}

async fn write_and_check_err(
Expand Down Expand Up @@ -179,7 +181,7 @@ WantedBy=multi-user.target"#;

#[cfg(target_os = "windows")]
fn get_daemon_start_command(&self) -> (&'static str, Vec<&'static str>) {
todo!()
("sc.exe", vec!["start", "rrdb", "run"])
}

fn check_output_status(&self, output: Result<Output, Error>) -> Result<(), RRDBError> {
Expand Down

0 comments on commit 00efbf0

Please sign in to comment.