feat: check
This commit is contained in:
@@ -140,10 +140,14 @@ async fn main() -> tide::Result<()> {
|
|||||||
};
|
};
|
||||||
let account_dir = matches.value_of("dir").unwrap_or("acme_dir");
|
let account_dir = matches.value_of("dir").unwrap_or("acme_dir");
|
||||||
|
|
||||||
|
let check = matches.is_present("check");
|
||||||
|
|
||||||
|
if !check {
|
||||||
let (s, r) = channel::bounded(1);
|
let (s, r) = channel::bounded(1);
|
||||||
startup_http_server(s, port);
|
startup_http_server(s, port);
|
||||||
r.recv().await.ok();
|
r.recv().await.ok();
|
||||||
task::sleep(Duration::from_millis(500)).await;
|
task::sleep(Duration::from_millis(500)).await;
|
||||||
|
}
|
||||||
|
|
||||||
let cert_config = matches.value_of("config");
|
let cert_config = matches.value_of("config");
|
||||||
match cert_config {
|
match cert_config {
|
||||||
@@ -178,7 +182,7 @@ async fn main() -> tide::Result<()> {
|
|||||||
exit(1);
|
exit(1);
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
if matches.is_present("check") {
|
if check {
|
||||||
check_cert_config(&cert_config);
|
check_cert_config(&cert_config);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user