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