1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-07-31 12:18:31 +00:00

add more systemd notify integration with stopping/reloading/ready states

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2025-02-05 01:45:21 -05:00 committed by Jason Volk
parent f6dfc9538f
commit fda8b36809
3 changed files with 18 additions and 6 deletions

View file

@ -43,7 +43,15 @@ impl Deref for Service {
#[implement(Service)]
fn handle_reload(&self) -> Result {
if self.server.config.config_reload_signal {
#[cfg(all(feature = "systemd", target_os = "linux"))]
sd_notify::notify(true, &[sd_notify::NotifyState::Reloading])
.expect("failed to notify systemd of reloading state");
self.reload(iter::empty())?;
#[cfg(all(feature = "systemd", target_os = "linux"))]
sd_notify::notify(true, &[sd_notify::NotifyState::Ready])
.expect("failed to notify systemd of ready state");
}
Ok(())