Ubic::Cmd - ubic methods with pretty printing.
version 1.07
use Ubic::Cmd; Ubic::Cmd->start("aaa.bbb");
When using ubic from simple scripts, you want to print some output about what happened when starting/stopping service.
This package mostly conforms to Ubic module API (i.e. to LSB init-script API).
Ubic
It also greatly simplifies writing /etc/init.d/ scripts (see synopsis).
All methods of this class can be invoked as class methods, but you can construct your own instance if neccesary (although constructor doesn't have any options by now, so it is useless).
All following methods do the same things as methods in Ubic, but they also print messages about their actions.
Do non-LSB command.
Print command's usage.
WARNING: exits on invocation!
Process each subservice of $name with $callback, printing correct indentations.
$name
$callback
Print status of given service identified by name or by object. If $cached_flag is true, prints status cached in watchdog file.
$cached_flag
Run given command for given service and exit with LSB-compatible exit code.
Parameters:
Service's name or arrayref with names.
Command to execute.
Force command on protected multiservice.
Interface of this class is unstable and can be changed without further notice.
When in doubt, consider Ubic or system("ubic COMMAND SERVICE") instead.
Vyacheslav Matjukhin <mmcleric@yandex-team.ru>
To install Ubic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ubic
CPAN shell
perl -MCPAN -e shell install Ubic
For more information on module installation, please visit the detailed CPAN module installation guide.