Ubic::Cmd - ubic methods with pretty printing.
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).
use Ubic::Cmd; Ubic::Cmd->start("aaa.bbb");
All methods of this class can be invoked as class methods, but you can construct your own instance if necessary (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
$callback, printing correct indentations.
Print status of given service identified by name or by object.
$force_cached is true, prints status cached in watchdog file. Otherwise, check for real status if current user is root or if current user is equal to service user.
Run given command for given service and exit with LSB-compatible exit code.
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 Matyukhin <firstname.lastname@example.org>
This software is copyright (c) 2016 by Yandex LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.