Skip to content

Commit

Permalink
fix resolver args
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Jul 22, 2024
1 parent a660317 commit f86f527
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/nginx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ impl Display for NginxConfig {
let ts = now.format("%Y-%m-%d %H:%M:%S");

writeln!(f, "#")?;
writeln!(f, "# kHOST {}", khost::VERSION)?;
writeln!(f, "# {ts}")?;
writeln!(f, "# kHOST v{}", khost::VERSION)?;
writeln!(f, "# Generated on {ts}")?;
writeln!(f, "#")?;
writeln!(f, "# Do not edit this file!")?;
writeln!(f, "#")?;
Expand Down
2 changes: 1 addition & 1 deletion src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl From<&Config> for Vec<String> {
let mut args = Arglist::default();

if config.stats {
args.push("--stats");
args.push("--status");
}

if let Some(interface) = config.http.as_ref() {
Expand Down
2 changes: 2 additions & 0 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ pub fn enable_services(ctx: &mut Context, services: Vec<ServiceDetail>) -> Resul
}

if !systemd::is_enabled(&ctx.config.resolver)? {
systemd::daemon_reload()?;
systemd::enable(&ctx.config.resolver)?;
systemd::start(&ctx.config.resolver)?;
}
}
_ => {}
Expand Down

0 comments on commit f86f527

Please sign in to comment.