[Add] Commands
This commit is contained in:
parent
0669b8be0a
commit
be2fd9837f
1 changed files with 10 additions and 1 deletions
|
|
@ -251,6 +251,15 @@ pub async fn run_command(command: &str) {
|
|||
log!("Failed to find user");
|
||||
}
|
||||
}
|
||||
["reload"] | ["restart"] => {
|
||||
log!("Restarting");
|
||||
*RELOAD.write().await = true;
|
||||
*SHUTDOWN.write().await = true;
|
||||
}
|
||||
["shutdown"] | ["stop"] => {
|
||||
log!("Shutting down");
|
||||
*SHUTDOWN.write().await = true;
|
||||
}
|
||||
_ => {
|
||||
log!("Unknown command");
|
||||
}
|
||||
|
|
@ -267,7 +276,7 @@ pub async fn ping(time: u64) {
|
|||
|
||||
let conn = match conn {
|
||||
Some(c) => c,
|
||||
None => return,
|
||||
_ => return,
|
||||
};
|
||||
|
||||
let response_cv = conn
|
||||
|
|
|
|||
Loading…
Reference in a new issue