mirror of
https://codeberg.org/icewind/netnsd.git
synced 2026-06-03 09:04:07 +02:00
updates
This commit is contained in:
parent
88f168b9e1
commit
7fca98398b
4 changed files with 118 additions and 199 deletions
|
|
@ -30,7 +30,7 @@ async fn daemon_async(mut config: Config) -> Result<(), DaemonError> {
|
|||
state.update(&config)?;
|
||||
|
||||
// now the namespaces are setup, we can tell systemd to start any service depending on them
|
||||
notify(false, &[NotifyState::Ready]).map_err(DaemonError::Notify)?;
|
||||
notify(&[NotifyState::Ready]).map_err(DaemonError::Notify)?;
|
||||
|
||||
let reload_signal = signal(SignalKind::hangup()).map_err(DaemonError::Signal)?;
|
||||
let reload_signal = SignalStream::new(reload_signal).map(|_| Event::Reload);
|
||||
|
|
@ -57,7 +57,7 @@ async fn daemon_async(mut config: Config) -> Result<(), DaemonError> {
|
|||
|
||||
match NotifyState::monotonic_usec_now() {
|
||||
Ok(notify_time) => {
|
||||
notify(false, &[NotifyState::Reloading, notify_time])
|
||||
notify(&[NotifyState::Reloading, notify_time])
|
||||
.map_err(DaemonError::Notify)?;
|
||||
}
|
||||
Err(error) => {
|
||||
|
|
@ -75,7 +75,7 @@ async fn daemon_async(mut config: Config) -> Result<(), DaemonError> {
|
|||
}
|
||||
}
|
||||
|
||||
notify(false, &[NotifyState::Ready]).map_err(DaemonError::Notify)?;
|
||||
notify(&[NotifyState::Ready]).map_err(DaemonError::Notify)?;
|
||||
}
|
||||
Event::Info => {
|
||||
for namespace in &state.namespaces {
|
||||
|
|
@ -88,7 +88,7 @@ async fn daemon_async(mut config: Config) -> Result<(), DaemonError> {
|
|||
}
|
||||
}
|
||||
|
||||
let _ = notify(false, &[NotifyState::Stopping]);
|
||||
let _ = notify(&[NotifyState::Stopping]);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue