NethServer::Service

NAME

  NethServer::Service module
  • new
Create a Service object

Arguments:

$serviceName
 The service to wrap

$configDb (optional)
 An opened Configuration database
  • start
Start the service if it is stopped

WARNING: Static invocation is supported for backward compatibility and
will be removed in the future.
  • stop
Stop the service if it is running

WARNING: Static invocation is supported for backward compatibility and
will be removed in the future.
  • condrestart
  • restart
  • reload
  • is_configured
Check if the service is defined in configuration database
  • is_enabled
Check if the service is enabled in configuration database.

WARNING: Static invocation is supported for backward compatibility and
will be removed in the future. Optionally, you can pass an already opened
esmith::ConfigDB object in $configDb. Example:

  if(is_enabled($daemon)) {
     start($daemon);
  }
  • is_owned
Check if the service is owned by a currently installed package.
  • is_running
Check if the service is running.
  • adjust
Adjust the service startup state and running state according to its
configuration, status prop and the owning package installation status.

The output parameter $action is set to 'start' or 'stop' if the service is
actually started or stopped.

Parameters: $action string by ref (OUT)

Returns a boolean value: success/failure
  • get_name
Return the service name

The last documentation

perldoc NethServer::Service