Documentation
¶
Overview ¶
Package systemd integrates with a systemd service manager when one is present: sd_notify readiness/status/stopping messages (Type=notify units) and detection of journald as the log sink. Everything is a no-op outside systemd, so the same binary runs unchanged in containers and on OpenWrt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Notify ¶
Notify sends one sd_notify(3) state string. It returns true when the message was delivered, false when there is no notify socket or sending failed (logged at debug level; never fatal).
func NotifyAvailable ¶
func NotifyAvailable() bool
NotifyAvailable reports whether systemd handed us a notify socket ($NOTIFY_SOCKET), i.e. the unit is Type=notify (or NotifyAccess= allows it).
func StderrIsJournal ¶
func StderrIsJournal() bool
StderrIsJournal reports whether stderr is connected to the systemd journal ($JOURNAL_STREAM matches the stderr device/inode), in which case journald records its own timestamps and ours would be redundant.
Types ¶
This section is empty.