Skip to content

Commit

Permalink
Small fixes in the supervisor code to build on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Hollensbe <[email protected]>
  • Loading branch information
Erik Hollensbe committed Jun 23, 2021
1 parent d41f104 commit 29a6519
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/supervise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ use serde::Serialize;
use tinytemplate::TinyTemplate;
use trust_dns_resolver::Name;

#[cfg(target_os = "windows")]
const SUPERVISE_SYSTEM_DIR: &str = "";
#[cfg(target_os = "windows")]
const SERVICE_TEMPLATE: &str = "";

#[cfg(target_os = "linux")]
const SUPERVISE_SYSTEM_DIR: &str = "/lib/systemd/system";

Expand Down Expand Up @@ -220,6 +225,11 @@ impl<'a> Properties {
}
}

#[cfg(target_os = "windows")]
fn service_name(&self) -> String {
return String::new();
}

#[cfg(target_os = "linux")]
fn service_name(&self) -> String {
format!("zeronsd-{}.service", self.network)
Expand Down

0 comments on commit 29a6519

Please sign in to comment.