fix(702): replace systemd_run_machine with reload_gateway_nginx in priv_client
This commit is contained in:
parent
efedfc3ea6
commit
29926031ae
1 changed files with 5 additions and 8 deletions
|
|
@ -111,14 +111,11 @@ pub async fn chmod(path: &Path, mode: u32) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run a command inside a machine container via `systemd-run --machine`.
|
/// Reload nginx inside `hive-gateway` via `systemd-run --machine`.
|
||||||
pub async fn systemd_run_machine(machine: &str, cmd: Vec<String>) -> Result<(String, String)> {
|
pub async fn reload_gateway_nginx() -> Result<()> {
|
||||||
let resp = call(&PrivRequest::SystemdRunMachine {
|
let resp = call(&PrivRequest::ReloadGatewayNginx).await?;
|
||||||
machine: machine.to_owned(),
|
check(resp)?;
|
||||||
cmd,
|
Ok(())
|
||||||
})
|
|
||||||
.await?;
|
|
||||||
check(resp)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check(resp: PrivResponse) -> Result<(String, String)> {
|
fn check(resp: PrivResponse) -> Result<(String, String)> {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue