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(())
|
||||
}
|
||||
|
||||
/// Run a command inside a machine container via `systemd-run --machine`.
|
||||
pub async fn systemd_run_machine(machine: &str, cmd: Vec<String>) -> Result<(String, String)> {
|
||||
let resp = call(&PrivRequest::SystemdRunMachine {
|
||||
machine: machine.to_owned(),
|
||||
cmd,
|
||||
})
|
||||
.await?;
|
||||
check(resp)
|
||||
/// Reload nginx inside `hive-gateway` via `systemd-run --machine`.
|
||||
pub async fn reload_gateway_nginx() -> Result<()> {
|
||||
let resp = call(&PrivRequest::ReloadGatewayNginx).await?;
|
||||
check(resp)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn check(resp: PrivResponse) -> Result<(String, String)> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue