GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  UBIC::CMD (3)

.ds Aq ’

NAME

Ubic::Cmd - ubic methods with pretty printing.

CONTENTS

VERSION

version 1.58

SYNOPSIS

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).

SYNOPSIS



    use Ubic::Cmd;
    Ubic::Cmd->start("aaa.bbb");



CONSTRUCTOR

<B>new($params)B> 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).

LSB METHODS

All following methods do the same things as methods in Ubic, but they also print messages about their actions.
<B>start($service)B>
<B>stop($service)B>
<B>restart($service)B>
<B>try_restart($service)B>
<B>reload($service)B>
<B>force_reload($name)B>

OTHER METHODS

<B>do_custom_command($service, B>$command<B>)B> Do non-LSB command.
<B>usage($command)B> Print command’s usage.

WARNING: exits on invocation!

<B>traverse($name_or_service, B>$callback<B>)B> Process each subservice of $name_or_service with $callback, printing correct indentations.
<B>print_status($name, B>$force_cached<B>)B>
<B>print_status($name, B>$force_cached<B>, B>$results<B>)B> Print status of given service identified by name or by object.

If $force_cached is true, prints status cached in watchdog file. Otherwise, check for real status if current user is <B>rootB> or if current user is equal to service user.

<B>run($params_hashref)B> Run given command for given service and exit with LSB-compatible exit code.

Parameters:
name Service’s name or arrayref with names.
command Command to execute.
force Force command on protected multiservice.

BUGS AND CAVEATS

Interface of this class is unstable and can be changed without further notice.

When in doubt, consider Ubic or system(ubic COMMAND SERVICE) instead.

AUTHOR

Vyacheslav Matyukhin <mmcleric@yandex-team.ru>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 UBIC::CMD (3) 2015-01-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.