10 | ||| Notify systemd about an event
11 | ||| After notifying systemd the Bool parameter specify if the environment
12 | ||| shall be unset (Further call to notify will fail).
13 | ||| The String is the event to pass.
14 | ||| Returns Nothing if the program was not started with systemd
15 | ||| or the environment was previously unset.
16 | export
22 | state
23 | Nothing
25 | ||| Same as `notify` but send along a socket to be stored.
26 | ||| It is up to the caller to properly set the message
27 | ||| (i.e: do not forget to set FDSTORE=1).
28 | export
35 | state
38 | ||| Notify the watchdog that the program is still alive.
39 | export
43 | "WATCHDOG=1"
45 | ||| Notify the systemd that the program is ready.
46 | export
50 | "READY=1"
52 | ||| Notify systemd of the PID of the program (for after a fork).
53 | export
59 | ||| Notify systemd that the service is reloading its configuration.
60 | export
64 | "RELOADING=1"
66 | ||| Notify systemd that the service is beginning its shutdown.
67 | export
71 | "STOPPING=1"
73 | ||| Notify systemd of an 'Errno' error.
74 | export
81 | ||| Notify systemd of the status of the program.
82 | ||| An arbitrary String can be passed.
83 | export
90 | ||| Notify systemd of a DBUS error like.
91 | ||| Correct formatting of the String is left to the caller.
92 | export
99 | ||| Notify systemd to store a socket for us.
100 | ||| To be used along `getActivatedSockets` during a restart.
101 | ||| Useful for zero downtime restart.
102 | export
108 | ||| Notify systemd to store a socket for us and specify a name.
109 | ||| To be used along `getActivatedSocketsWithNames` during a restart.
110 | ||| Useful for zero downtime restart.
111 | export
117 | name
119 | ||| Return a list of activated sockets, if the program was started with
120 | ||| socket activation.
121 | ||| The sockets are in the same order as in the associated .socket file.
122 | ||| The sockets will have their family, type, and status set appropriately.
123 | ||| Returns Nothing in systems without socket activation (or
124 | ||| when the program was not socket activated).
125 | export
135 | pure $
138 | ||| Same as `getActivatedSockets` but return also the names associated
139 | ||| with those sockets if `storeFdWithName` was used or specified in the .socket file.
140 | ||| If `storeFd` was used to transmit the socket to systemd, the name will be a generic one
141 | ||| (i.e: usally "stored").
142 | export
153 | pure $