mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 19:02:50 +02:00
support executing configurable admin commands via SIGUSR2
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
2f449ba47d
commit
2c5af902a3
6 changed files with 72 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
|||
pub mod console;
|
||||
mod create;
|
||||
mod execute;
|
||||
mod grant;
|
||||
mod startup;
|
||||
|
||||
use std::{
|
||||
future::Future,
|
||||
|
@ -183,7 +183,11 @@ impl Service {
|
|||
.map(|complete| complete(command))
|
||||
}
|
||||
|
||||
async fn handle_signal(&self, #[allow(unused_variables)] sig: &'static str) {
|
||||
async fn handle_signal(&self, sig: &'static str) {
|
||||
if sig == execute::SIGNAL {
|
||||
self.signal_execute().await.ok();
|
||||
}
|
||||
|
||||
#[cfg(feature = "console")]
|
||||
self.console.handle_signal(sig).await;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue