Package DE_EPAGES::Installer::API::Service
Functions for starting/stopping epages services.
@EXPORT_OK |
Functions
- EpagesCustomizedHttpdDaemon
- EpagesCustomizedMongoDb
- EpagesCustomizedMysqlDaemon
- ExistsService
- StartService
- StatusService
- StatusUnixService
- StatusWin32Service
- StopService
EpagesCustomizedHttpdDaemon
Returns name of httpd run script located in /etc/init.d if httpd daemon exists and is ePages customized, otherwise undef.
Syntax |
$RunScript = EpagesCustomizedHttpdDaemon($hFlags); |
Example |
$RunScript = EpagesCustomizedHttpdDaemon(); if ($RunScript) { system("$RunScript restart"); } else { say 'ePages customized httpd demaon not installed"; } |
Input |
|
Return |
|
EpagesCustomizedMongoDb
Returns the name of the MongoDB run script located in /etc/init.d if MongoDB daemon exists, otherwise undef.
Syntax |
$RunScript = EpagesCustomizedMongoDb($hFlags); |
Example |
$RunScript = EpagesCustomizedMongoDb(); if ($RunScript) { system("$RunScript restart"); } else { say 'ePages customized MongoDB daemon not installed"; } |
Input |
|
Return |
|
EpagesCustomizedMysqlDaemon
Returns name of MySQL run script located in /etc/init.d if MySQL daemon exists, otherwise undef.
Syntax |
$RunScript = EpagesCustomizedMysqlDaemon($hFlags); |
Example |
$RunScript = EpagesCustomizedMysqlDaemon(); if ($RunScript) { system("$RunScript restart"); } else { say 'ePages customized MySQL daemon not installed"; } |
Input |
|
Return |
|
ExistsService
Returns true if the specified service exists on the current machine.
Syntax |
$Exists = ExistsService( $ServiceAlias ); |
Example |
StopService( 'webServer' ) if ExistsService( 'webserver' ); |
Input |
|
Return |
|
StartService
Starts one of the epages services. Stops and restarts the service if it is already running.
Syntax |
StartService( $ServiceAlias, $hFlags ); |
Example |
StartService( 'webserver' ); |
Input |
|
StatusService
Shows current status of the epages service.
Syntax |
$hStatus = StatusService( $ServiceAlias, $hFlags ); |
Example |
$hStatus = StatusService( 'webserver' ); use DE_EPAGES::Installer::API::Constants qw(RUNNING); say 'webserver: running' if $hStatus->{webserver} == RUNNING |
Input |
|
Return |
|
StatusUnixService
Shows current status of run script, located in /etc/init.d/$Service.
Syntax |
$Status = StatusUnixService($Service, $hFlags); |
Example |
$Status = StatusUnixService( 'httpd' ); use DE_EPAGES::Installer::API::Constants qw(RUNNING); say 'webserver: running' if $Status == RUNNING |
Input |
|
Return |
|
StatusWin32Service
Shows current status of the windows service.
Syntax |
$Status = StatusWin32Service($Service, $hFlags); |
Example |
$Status = StatusWin32Service( 'W3SVC' ); use DE_EPAGES::Installer::API::Constants qw(RUNNING); say 'webserver: running' if $Status == RUNNING |
Input |
|
Return |
|
StopService
Stops one of the epages services.
Syntax |
StopService( $ServiceAlias, $hFlags ); |
Example |
StopService( 'webserver' ); |
Input |
|