Crate sd_notify

Source
Expand description

Lightweight crate for interacting with systemd.

This crate can be used to send service readiness or state change notifications to systemd or compatible service managers. It doesn’t offer the full functionality of libsystemd, but is pure-Rust and has no dependencies.

For bindings to the native libsystemd library, see the systemd crate. For a more complete Rust reimplementation of libsystemd API, see the libsystemd crate.

§Example

let _ = sd_notify::notify(true, &[NotifyState::Ready]);

Enums§

NotifyState
Daemon notification for the service manager.

Functions§

booted
Checks whether the system has been booted by systemd.
listen_fds
Checks for file descriptors passed by the service manager for socket activation.
listen_fds_with_names
Checks for file descriptors passed by the service manager for socket activation.
notify
Sends the service manager a list of state changes.
watchdog_enabled
Asks the service manager for enabled watchdog.