mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-07-30 23:30:11 -07:00
cli: handle the exit status of wg process
This commit is contained in:
committed by
Karolin Varner
parent
dd39936220
commit
bf850e3072
+8
-2
@@ -1,7 +1,7 @@
|
||||
use anyhow::bail;
|
||||
|
||||
use anyhow::Result;
|
||||
use log::{error, info, warn};
|
||||
use log::{debug, error, info, warn};
|
||||
use mio::Interest;
|
||||
use mio::Token;
|
||||
|
||||
@@ -633,7 +633,13 @@ impl AppServer {
|
||||
.args(&owg.extra_params)
|
||||
.spawn()?;
|
||||
b64_writer(child.stdin.take().unwrap()).write_all(key.secret())?;
|
||||
child.wait()?;
|
||||
let status = child.wait()?;
|
||||
|
||||
if status.success() {
|
||||
debug!("successfully passed psk to wg");
|
||||
} else {
|
||||
error!("could not pass psk to wg {:?}", status);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user