OpenMediaVault  3.0 (Erasmus)
The open network attached storage solution
Public Member Functions | List of all members
OMV\System\SystemCtl Class Reference

Public Member Functions

 __construct ($name)
 
 getName ()
 
 setOption ($arg)
 
 clearOptions ()
 
 enable ($now=FALSE, $quiet=FALSE)
 
 disable ($now=FALSE, $quiet=FALSE)
 
 reenable ($quiet=FALSE)
 
 isEnabled ()
 
 start ($quiet=FALSE)
 
 stop ($quiet=FALSE)
 
 restart ($quiet=FALSE)
 
 reload ($quiet=FALSE)
 
 mask ($quiet=FALSE)
 
 unmask ($quiet=FALSE)
 
 isActive ()
 
 waitUntilActive ($timeout)
 
 kill ($signal, $quiet=FALSE)
 

Detailed Description

Control the systemd system and service manager.

Constructor & Destructor Documentation

OMV\System\SystemCtl::__construct (   $name)

Constructor

Parameters
nameThe name of the unit, e.g. ssh.

Member Function Documentation

OMV\System\SystemCtl::clearOptions ( )

Reset the list of command options.

OMV\System\SystemCtl::disable (   $now = FALSE,
  $quiet = FALSE 
)

Disable the specified unit file.

Parameters
nowSet to TRUE to stop the unit after it has been disabled. Defaults to FALSE.
OMV\System\SystemCtl::enable (   $now = FALSE,
  $quiet = FALSE 
)

Enable the specified unit file.

Parameters
nowSet to TRUE to start the unit after it has been enabled. Defaults to FALSE.
OMV\System\SystemCtl::getName ( )

Get the name of the unit.

Returns
The name of the unit.
OMV\System\SystemCtl::isActive ( )

Check whether the specified unit is active (i.e. running).

Returns
TRUE if the unit is active, otherwise FALSE.
OMV\System\SystemCtl::isEnabled ( )

Checks whether the specified unit file is enabled.

Returns
TRUE if the unit is enabled, otherwise FALSE.
OMV\System\SystemCtl::kill (   $signal,
  $quiet = FALSE 
)

Send a signal to the process of the unit.

Parameters
signalMust be one of the well known signal specifiers such as SIGHUP, SIGTERM, SIGINT or SIGSTOP.
OMV\System\SystemCtl::mask (   $quiet = FALSE)

Mask the specified unit file.

OMV\System\SystemCtl::reenable (   $quiet = FALSE)

Reenable the specified unit file.

OMV\System\SystemCtl::reload (   $quiet = FALSE)

Asks the specified unit to reload its configuration.

OMV\System\SystemCtl::restart (   $quiet = FALSE)

Restart the specified unit.

OMV\System\SystemCtl::setOption (   $arg)

Set a command option.

OMV\System\SystemCtl::start (   $quiet = FALSE)

Start (activate) the specified unit.

OMV\System\SystemCtl::stop (   $quiet = FALSE)

Stop (deactivate) the specified unit.

OMV\System\SystemCtl::unmask (   $quiet = FALSE)

Unmask the specified unit file.

OMV\System\SystemCtl::waitUntilActive (   $timeout)

Wait until the specified unit is active. If the unit is not active within the given time, then an exception is thrown.

Parameters
timeoutTimeout in seconds to wait for an active unit.
Returns
None.
Exceptions

The documentation for this class was generated from the following file: