#include <Service.hpp>
Inheritance diagram for limal::runlevel::Service:

Public Member Functions | |
| Service (const BLOCXX_NAMESPACE::String &name) | |
| ~Service () | |
| BLOCXX_NAMESPACE::String | getServiceName () const |
| BLOCXX_NAMESPACE::String | getScriptPath () const |
| BLOCXX_NAMESPACE::String | getScriptName () const |
| bool | isServiceInstalled () const |
| int | executeScript (const ServiceCmdArgs &cmdArgs, BLOCXX_NAMESPACE::String &stdOutput, BLOCXX_NAMESPACE::String &errOutput, const ServiceEnvVars &envVars, const BLOCXX_NAMESPACE::String &stdInput, int timeoutSecs, int outputLimit) |
| int | executeScript (const ServiceCmdArgs &cmdArgs) |
| int | executeScript (const ServiceCmdArgs &cmdArgs, BLOCXX_NAMESPACE::String &stdOutput, BLOCXX_NAMESPACE::String &errOutput, int &execStatus, const ServiceEnvVars &envVars, const BLOCXX_NAMESPACE::String &stdInput, int timeoutSecs, int outputLimit) |
| Deprecated execute the service script variant. | |
Protected Member Functions | |
| void | setScriptName (const BLOCXX_NAMESPACE::String &name) |
Private Member Functions | |
| Service () | |
Private Attributes | |
| BLOCXX_NAMESPACE::String | m_path |
| BLOCXX_NAMESPACE::String | m_name |
This class provides a generic interface to service scripts.
|
|
Construct a Service object using the specified name.
|
|
|
Destructor of Service. |
|
|
|
|
||||||||||||||||||||||||||||||||||||
|
Deprecated execute the service script variant.
|
|
|
Execute the service script. This method discards the output of the script, uses the environment of the current process and supports additional arguments.
|
|
||||||||||||||||||||||||||||||||
|
Execute the service script. This method uses the specified additional arguments (the 0th argument is always passed) and execution environment. The stdout and stderr outputs are gathered into the specified stdOutput and errOutput variables. If the envVars map is empty, the environment of the current process is used. It returns the exit status of the script process, if the script terminated normally or -1 in any other case (killed, core dumped). If a timeout or output limit is reached, the process will be killed and an exception is thrown. See blocxx::Exec::executeProcessAndGatherOutput() methods documentation for more informations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set the service name and optionally the script path.
|
|
|
|
|
|
|
1.4.6