Idris2Doc : System.Systemd.Daemon

System.Systemd.Daemon

(source)

Reexports

importpublic System.Systemd.Daemon.Fd
importpublic System.Systemd.Internal

Definitions

notify : Bool->String->IO (Maybe ())
  Notify systemd about an event
After notifying systemd the Bool parameter specify if the environment
shall be unset (Further call to notify will fail).
The String is the event to pass.
Returns Nothing if the program was not started with systemd
or the environment was previously unset.

Visibility: export
notifyWithFD : Bool->String->SocketAF_UNIX->IO (Maybe ())
  Same as `notify` but send along a socket to be stored.
It is up to the caller to properly set the message
(i.e: do not forget to set FDSTORE=1).

Visibility: export
notifyWatchdog : IO (Maybe ())
  Notify the watchdog that the program is still alive.

Visibility: export
notifyReady : IO (Maybe ())
  Notify the systemd that the program is ready.

Visibility: export
notifyPID : Int->IO (Maybe ())
  Notify systemd of the PID of the program (for after a fork).

Visibility: export
notifyReloading : IO (Maybe ())
  Notify systemd that the service is reloading its configuration.

Visibility: export
notifyStopping : IO (Maybe ())
  Notify systemd that the service is beginning its shutdown.

Visibility: export
notifyErrno : Errno->IO (Maybe ())
  Notify systemd of an 'Errno' error.

Visibility: export
notifyStatus : String->IO (Maybe ())
  Notify systemd of the status of the program.
An arbitrary String can be passed.

Visibility: export
notifyBusError : String->IO (Maybe ())
  Notify systemd of a DBUS error like.
Correct formatting of the String is left to the caller.

Visibility: export
storeFd : SocketAF_UNIX->IO (Maybe ())
  Notify systemd to store a socket for us.
To be used along `getActivatedSockets` during a restart.
Useful for zero downtime restart.

Visibility: export
storeFdWithName : SocketAF_UNIX->String->IO (Maybe ())
  Notify systemd to store a socket for us and specify a name.
To be used along `getActivatedSocketsWithNames` during a restart.
Useful for zero downtime restart.

Visibility: export
getActivatedSockets : IO (Maybe (List (SocketAF_UNIX)))
  Return a list of activated sockets, if the program was started with
socket activation.
The sockets are in the same order as in the associated .socket file.
The sockets will have their family, type, and status set appropriately.
Returns Nothing in systems without socket activation (or
when the program was not socket activated).

Visibility: export
getActivatedSocketsWithNames : IO (Maybe (List (SocketAF_UNIX, String)))
  Same as `getActivatedSockets` but return also the names associated
with those sockets if `storeFdWithName` was used or specified in the .socket file.
If `storeFd` was used to transmit the socket to systemd, the name will be a generic one
(i.e: usally "stored").

Visibility: export