◆ __construct()
OMV\System\SysVInitScript::__construct |
( |
|
$name, |
|
|
|
$enable = FALSE , |
|
|
|
$update = TRUE |
|
) |
| |
Constructor
- Parameters
-
name | The name of the init script. |
enable | TRUE to start the process. Defaults to FALSE. |
update | TRUE to call the update-rc.d script. Defaults to TRUE. |
◆ defaults()
OMV\System\SysVInitScript::defaults |
( |
| ) |
|
Make links to start and stop the service in the defined runlevels.
◆ disable()
OMV\System\SysVInitScript::disable |
( |
| ) |
|
Disable the system init script.
◆ enable()
OMV\System\SysVInitScript::enable |
( |
| ) |
|
Enable the system init script.
◆ exec()
OMV\System\SysVInitScript::exec |
( |
| ) |
|
Depending on the given constriuctor parameter do the following:
- Stop the init script
- If service is enabled, then install and start init script, otherwise remove init script.
◆ invoke()
OMV\System\SysVInitScript::invoke |
( |
|
$action | ) |
|
Invoke init script with the given aktion. Throws an exception in case of an error.
- Parameters
-
action | The action to be executed. |
- Exceptions
-
◆ reload()
OMV\System\SysVInitScript::reload |
( |
| ) |
|
Invoke init script with parameter 'reload'.
◆ remove()
OMV\System\SysVInitScript::remove |
( |
| ) |
|
Remove the system init script from all runlevels.
◆ restart()
OMV\System\SysVInitScript::restart |
( |
| ) |
|
Invoke init script with parameter 'restart'.
◆ start()
OMV\System\SysVInitScript::start |
( |
| ) |
|
Invoke init script with parameter 'start'.
◆ status()
OMV\System\SysVInitScript::status |
( |
| ) |
|
Invoke init script with parameter 'status'.
- Returns
- One of the following exit status codes: 0 program is running or service is OK 1 program is dead and /var/run pid file exists 2 program is dead and /var/lock lock file exists 3 program is not running 4 program or service status is unknown 5-99 reserved for future LSB use 100-149 reserved for distribution use 150-199 reserved for application use 200-254 reserved See http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
◆ stop()
OMV\System\SysVInitScript::stop |
( |
| ) |
|
Invoke init script with parameter 'stop'.
The documentation for this class was generated from the following file: