#!/usr/bin/perl
package bin::ubic;
BEGIN {
  $bin::ubic::VERSION = '1.18';
}

use strict;
use warnings;

# ABSTRACT: simple viewer of ubic services


use Getopt::Long 2.33;
use Pod::Usage;

use Ubic;
use Ubic::Cmd;

return 1 if caller();

my $force;
GetOptions(
    'f|force' => \$force,
) or pod2usage(2);

unless (@ARGV) {
    pod2usage(2);
}

my $command = shift @ARGV;
if (@ARGV) {
    Ubic::Cmd->run({
        name => [@ARGV],
        command => $command,
        force => $force,
    });
}
else {
    Ubic::Cmd->run({
        name => undef,
        command => $command,
        force => $force,
    });
}


__END__
=pod

=head1 NAME

bin::ubic - simple viewer of ubic services

=head1 VERSION

version 1.18

=head1 SYNOPSIS

 ubic [-f] COMMAND [SERVICE]...

 Supported commands:
    status
    start
    stop
    restart
    reload
    force-reload
    cached-status
    try-restart
    ...and any service-specific commands

=head1 AUTHOR

Vyacheslav Matyukhin <mmcleric@yandex-team.ru>

=head1 COPYRIGHT AND LICENSE

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

=cut

