add server restart support w/ admin command
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
2cb31275f0
commit
c6f4b20e17
5 changed files with 54 additions and 2 deletions
|
@ -49,6 +49,10 @@ pub(crate) enum ServerCommand {
|
|||
/// - Hot-reload the server
|
||||
Reload,
|
||||
|
||||
#[cfg(unix)]
|
||||
/// - Restart the server
|
||||
Restart,
|
||||
|
||||
/// - Shutdown the server
|
||||
Shutdown,
|
||||
}
|
||||
|
@ -72,6 +76,8 @@ pub(crate) async fn process(command: ServerCommand, body: Vec<&str>) -> Result<R
|
|||
} => admin_notice(body, message).await?,
|
||||
#[cfg(conduit_mods)]
|
||||
ServerCommand::Reload => reload(body).await?,
|
||||
#[cfg(unix)]
|
||||
ServerCommand::Restart => restart(body).await?,
|
||||
ServerCommand::Shutdown => shutdown(body).await?,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue