my $serv = ManaTools::Shared::Services->new();
my ($l, $on_services) = $serv->services();
This module aims to share all the API to manage system services, to be used from GUI applications or console. From the original code drakx services.
perldoc ManaTools::Shared::Services
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.
This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
A HashRef collecting all the service information. if include_static_services (default is false) is set also static services are included.
name: Service Name
OUTPUT
Description: Service description
DESCRIPTION
THis function return the description for the given service
$service: Service name $enable: enable/disable service
DESCRIPTION
This function enable/disable at boot the given service
xinetd_services: All the xinetd services
DESCRIPTION
This functions returns all the xinetd services in the system. NOTE that xinetd *must* be enable at boot to get this info
$reload: load service again
OUTPUT
@l: all the system services @on_services: all the services that start at boot
DESCRIPTION
This function returns two lists, all the system service and all the active ones.
$service: Service name
OUTPUT
0/1: if the service exists
DESCRIPTION
This function checks if a service is installed by looking for its unit or init.d service
$service: Service to restart
DESCRIPTION
This function restarts a given service
$service: Service to restart or start
DESCRIPTION
This function starts a given service if it is not running, it restarts that otherwise
$service: Service to start
DESCRIPTION
This function starts a given service
$service: Service to start
DESCRIPTION
This function starts a given service if not running
$service: Service to stop
DESCRIPTION
This function stops a given service
$service: Service to check
DESCRIPTION
This function returns if the given service is running
$service: Service name
DESCRIPTION
This function returns if the given service starts at boot
$service: Service name
DESCRIPTION
This function set the given service active at boot
$service: Service name
DESCRIPTION
This function set the given service disabled at boot
$service: Service name $o_dont_apply: do not start it now
DESCRIPTION
This function set the given service active at boot and restarts it if o_dont_apply is not given
$service: Service name $o_dont_apply: do not stop it now
DESCRIPTION
This function set the given service disabled at boot and stops it if o_dont_apply is not given
$service: Service name $enable: Enable/disable $o_dont_apply: do not start it now
DESCRIPTION
This function set the given service to enable/disable at boot and restarts/stops it if o_dont_apply is not given
$unit: unit name $property: property name
OUTPUT
$property_value: property value
DESCRIPTION
This method returns the requested property value