mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-12-12 10:18:57 -05:00
add more systemd notify integration with stopping/reloading/ready states
Some checks failed
CI and Artifacts / Test (push) Has been cancelled
CI and Artifacts / Build (push) Has been cancelled
CI and Artifacts / Build MacOS Binaries (push) Has been cancelled
CI and Artifacts / variables (push) Has been cancelled
CI and Artifacts / Docker publish (push) Has been cancelled
Documentation and GitHub Pages / Documentation and GitHub Pages (push) Has been cancelled
Some checks failed
CI and Artifacts / Test (push) Has been cancelled
CI and Artifacts / Build (push) Has been cancelled
CI and Artifacts / Build MacOS Binaries (push) Has been cancelled
CI and Artifacts / variables (push) Has been cancelled
CI and Artifacts / Docker publish (push) Has been cancelled
Documentation and GitHub Pages / Documentation and GitHub Pages (push) Has been cancelled
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
f6dfc9538f
commit
fda8b36809
3 changed files with 18 additions and 6 deletions
|
|
@ -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(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue