[Add] Commands

This commit is contained in:
Alex Emmet 2026-02-25 09:23:04 +01:00
commit be2fd9837f

View file

@ -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