.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Munin::Common::Daemon 3pm" .TH Munin::Common::Daemon 3pm 2024-02-28 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Munin::Common::Daemon \- utilities for daemons. .SH SYNOPSIS .IX Header "SYNOPSIS" The following daemon-related features are supported: .IP "sd_notify: signal readiness of the daemon" 4 .IX Item "sd_notify: signal readiness of the daemon" .SH SUBROUTINES .IX Header "SUBROUTINES" .SS emit_sd_notify_message .IX Subsection "emit_sd_notify_message" Example: .PP .Vb 1 \& emit_sd_notify_message(); .Ve .PP Send a "ready" signal according to the \f(CW\*(C`sd_notify\*(C'\fR interface: .IP "1. check whether the environment variable ""NOTIFY_SOCKET"" is defined" 4 .IX Item "1. check whether the environment variable ""NOTIFY_SOCKET"" is defined" .PD 0 .IP "2. remove this variable from the environment (this interface is not propagated to children)" 4 .IX Item "2. remove this variable from the environment (this interface is not propagated to children)" .IP "3. send the string ""READY=1"" to the socket" 4 .IX Item "3. send the string ""READY=1"" to the socket" .PD .PP The function returns silently, if something fails. .PP The function should be called as soon as the service is ready to accept requests. Calling this function is always safe \- independent of the caller supporting the \&\f(CW\*(C`sd_notify\*(C'\fR interface or not. .PP Examples for callers supporting the \f(CW\*(C`sd_notify\*(C'\fR interface: .ie n .IP "systemd: see ""Type=Notify"" in ""5"" in systemd.exec" 4 .el .IP "systemd: see \f(CWType=Notify\fR in ""5"" in systemd.exec" 4 .IX Item "systemd: see Type=Notify in ""5"" in systemd.exec" .PD 0 .ie n .IP "start-stop-daemon: see ""\-\-notify\-await"" in ""8"" in start-stop-daemon" 4 .el .IP "start-stop-daemon: see \f(CW\-\-notify\-await\fR in ""8"" in start-stop-daemon" 4 .IX Item "start-stop-daemon: see --notify-await in ""8"" in start-stop-daemon" .PD .PP See the specification of "sd_notify" for further details of this interface.