[][src]Crate sd_notify

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.

Constants

SD_LISTEN_FDS_START

Value of the first file descriptor passed for by the service manager for socket activation.

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.

notify

Sends the service manager a list of state changes.