Apache Mesos
Namespaces | Classes | Functions
systemd Namespace Reference

Namespaces

 mesos
 
 slices
 
 socket_activation
 

Classes

class  Flags
 Flags to initialize systemd state. More...
 

Functions

const Flagsflags ()
 
Try< Nothinginitialize (const Flags &flags)
 Initialized state for support of systemd functions in this file. More...
 
bool exists ()
 Check if we are on a systemd environment by: (1) Testing whether /sbin/init links to systemd. More...
 
bool enabled ()
 Check if systemd exists, and whether we have initialized it. More...
 
Path runtimeDirectory ()
 Returns the path to the runtime directory for systemd units. More...
 
Path hierarchy ()
 Return the path to the systemd hierarchy. More...
 
Try< NothingdaemonReload ()
 Runs systemctl daemon-reload. More...
 

Function Documentation

Try<Nothing> systemd::daemonReload ( )

Runs systemctl daemon-reload.

Used after updating configuration files.

Returns
Nothing if successful, otherwise Error.
bool systemd::enabled ( )

Check if systemd exists, and whether we have initialized it.

bool systemd::exists ( )

Check if we are on a systemd environment by: (1) Testing whether /sbin/init links to systemd.

(2) Testing whether we have a systemd version. TODO(jmlvanre): This logic can be made more robust, but there does not seem to be a standardized way to test the executing init system in a cross-platform way. The task is made slightly easier because we are only interested in identifying if we are running on systemd, not which specific init system is running.

Returns
Whether running on a systemd environment.
const Flags& systemd::flags ( )
Path systemd::hierarchy ( )

Return the path to the systemd hierarchy.

Try<Nothing> systemd::initialize ( const Flags flags)

Initialized state for support of systemd functions in this file.

Returns
Nothing if successful, otherwise Error.
Path systemd::runtimeDirectory ( )

Returns the path to the runtime directory for systemd units.