OpenMediaVault  0.6 (Kralizec)
The open network attached storage solution
 All Classes Functions Variables Groups Pages
Public Member Functions | List of all members
OMVSysVInitScript Class Reference
Inheritance diagram for OMVSysVInitScript:
OMVObject

Public Member Functions

 __construct ($name, $enable=FALSE, $update=TRUE)
 
 exec ()
 
 enable ()
 
 disable ()
 
 defaults ()
 
 remove ()
 
 start ()
 
 stop ()
 
 restart ()
 
 reload ()
 
 invoke ($action)
 
 status ()
 
- Public Member Functions inherited from OMVObject
 __construct ()
 
 getLastError ()
 

Additional Inherited Members

- Protected Member Functions inherited from OMVObject
 setLastError ($error)
 
 debug ()
 

Detailed Description

This file is part of OpenMediaVault.

License:
http://www.gnu.org/licenses/gpl.html GPL Version 3
Author
Volker Theile volke.nosp@m.r.th.nosp@m.eile@.nosp@m.open.nosp@m.media.nosp@m.vaul.nosp@m.t.org

OpenMediaVault is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

OpenMediaVault is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with OpenMediaVault. If not, see http://www.gnu.org/licenses/.

Constructor & Destructor Documentation

OMVSysVInitScript::__construct (   $name,
  $enable = FALSE,
  $update = TRUE 
)

Constructor

Parameters
nameThe name of the init script.
enableTRUE to start the process. Defaults to FALSE.
updateTRUE to call the update-rc.d script. Defaults to TRUE.

Member Function Documentation

OMVSysVInitScript::defaults ( )

Make links to start and stop the service in the defined runlevels.

Exceptions
E_EXEC_FAILED
OMVSysVInitScript::disable ( )

Disable the system init script.

OMVSysVInitScript::enable ( )

Enable the system init script.

OMVSysVInitScript::exec ( )

Depending on the given constriuctor parameter do the following:

  1. Stop the init script
  2. If service is enabled, then install and start init script, otherwise remove init script.
OMVSysVInitScript::invoke (   $action)

Invoke init script with the given aktion. Throws an exception in case of an error.

Parameters
actionThe action to be executed.
Exceptions
E_EXEC_FAILED
OMVSysVInitScript::reload ( )

Invoke init script with parameter 'reload'.

OMVSysVInitScript::remove ( )

Remove the system init script from all runlevels.

Exceptions
E_EXEC_FAILED
OMVSysVInitScript::restart ( )

Invoke init script with parameter 'restart'.

OMVSysVInitScript::start ( )

Invoke init script with parameter 'start'.

OMVSysVInitScript::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
OMVSysVInitScript::stop ( )

Invoke init script with parameter 'stop'.


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