Overview

Classes

  • Package
  • Service
  • Tlaloc_File
  • User
  • Overview
  • Class
  • Tree

Class Service

A Service management object meant for OpenBSD

this object should allow; starting, stopping, settuping and removing OpenBSD services. Meant to virtualize the base command line tools so we can later port this object to other OSes like Linux, CentOS, etc..

Located at Service.php
Methods summary
public
# __construct( mixed & $obj_File )

Service::__construct() Instantiate a Service object, just make sure to pass in a File object, it needs it.

Service::__construct() Instantiate a Service object, just make sure to pass in a File object, it needs it.

Parameters

$obj_File
mixed
public boolean
# Start( mixed $Service_Name, mixed $Ovr_ServiceName_PS_Check = null, boolean $flag_Restart_ifRunning = true )

Service::Start() Start a service.

Service::Start() Start a service.

Parameters

$Service_Name
mixed
Service_Name (see /etc/rc.d/*)
$Ovr_ServiceName_PS_Check
mixed
If using PS to check service status, you can override the string used to grep the PS output
$flag_Restart_ifRunning
boolean
By default true, will kick a restart if already running

Returns

boolean
result of the operation
public boolean
# isRunning( mixed $Service_Name )

Service::isRunning() Check to see if a service is running

Service::isRunning() Check to see if a service is running

Parameters

$Service_Name
mixed

Returns

boolean
$result
public boolean
# Stop( mixed $Service_Name )

Service::Stop() Stop a running service

Service::Stop() Stop a running service

Parameters

$Service_Name
mixed

Returns

boolean
$result
public boolean
# Setup( mixed $Service_Name, mixed $daemon_User = null, mixed $daemon_Flags = null )

Service::Setup() Configure a service to start automatically at boot-time, using the rc.d methodology on OpenBSD

Service::Setup() Configure a service to start automatically at boot-time, using the rc.d methodology on OpenBSD

Parameters

$Service_Name
mixed
$daemon_User
mixed
$daemon_Flags
mixed

Returns

boolean
$result
public boolean
# Remove( mixed $Service_Name )

Service::Remove() Remove a particular service from the host's booting process, without uninstalling anything.

Service::Remove() Remove a particular service from the host's booting process, without uninstalling anything.

Parameters

$Service_Name
mixed

Returns

boolean
$result
Properties summary
public array $SUPPORTED_COMMANDS array("start"=>"start a service","stop"=>"Stop a service","setup"=>"Setup a service for boot time","remove"=>"Remove a service from boot time")
#
public array $Digest array()
#
private $TFile
#
API documentation generated by ApiGen 2.6.0