Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

document all command-line options

  • Loading branch information...
commit bc2671a3c4971ff232a228e0286ff18dd75228df 1 parent 5d139a0
@berekuk authored
Showing with 82 additions and 2 deletions.
  1. +3 −0  Changes
  2. +75 −0 bin/ubic-admin
  3. +1 −1  dist.ini
  4. +3 −1 lib/Ubic/Admin/Setup.pm
View
3  Changes
@@ -1,6 +1,9 @@
Revision history for Ubic
{{$NEXT}}
+ * ubic-admin:
+ - fix local installation mode
+ - document all command-line options
1.35 2011-10-07
* fix build - ubic-daemon doesn't fail compile test if ubic is not installed
View
75 bin/ubic-admin
@@ -10,6 +10,81 @@ use warnings;
ubic-admin setup [--batch-mode] [--quiet] [other options]
+=head1 DESCRIPTION
+
+This script can be used to perform ubic administration operations.
+
+There is only one command supported by now, I<setup>.
+
+The logic behind the separation of setup process to this script instead of
+implementing it as C<ubic setup> command is following: C<ubic> script always
+operates on services, each of its commands (C<ubic status>, C<ubic start>, etc.)
+can accept service names. C<ubic-admin>, on the other hand, performs installation-wide tasks.
+
+=head1 SETUP OPTIONS
+
+=over
+
+=item B<--local>
+
+Force local installation.
+
+=item B<--batch-mode>
+
+Enable batch mode: don't ask any questions, assume defaults.
+
+=item B<--quiet>
+
+Don't print verbose description before each question.
+
+=item B<--reconfigure>
+
+Force reconfiguration even if ubic is already configured.
+
+=item B<--service-dir=DIR>
+
+Override service dir (directory with descriptions of your services).
+
+=item B<--data-dir=DIR>
+
+Override data dir (directory into which ubic stores all of its data).
+
+=item B<--log-dir=DIR>
+
+Override log dir (directory into which C<ubic.watchdog> will write its logs).
+
+=item B<--default-user=USER>
+
+Override default user for services which don't specify the user themselves.
+
+This option is useful for system-wide installations only.
+
+=item B<--sticky-777>
+
+Enable 1777 grants for data dir.
+
+This option is useful for system-wide installations only.
+
+It is enabled by default, you can turn it off with B<--no-sticky-777>.
+
+=item B<--install-services>
+
+Install standard services: C<ubic.watchdog>, C<ubic.ping> and C<ubic.update>.
+
+C<ubic.watchdog> will be started automatically.
+
+This option is enabled by default, you can turn it off with
+B<--no-install-services>.
+
+=item B<--crontab>
+
+Install watchdog's watchdog to user's crontab.
+
+This option is enabled by default, you can turn it off with
+B<--no-crontab>.
+
+=back
+
=cut
use Pod::Usage;
View
2  dist.ini
@@ -1,5 +1,5 @@
name = Ubic
-version = 1.35
+version = 1.35_01
author = Vyacheslav Matyukhin <mmcleric@yandex-team.ru>
license = Perl_5
copyright_holder = Yandex LLC
View
4 lib/Ubic/Admin/Setup.pm
@@ -179,7 +179,10 @@ sub setup {
my $opt_crontab = 1;
my $opt_local;
+ # These options are documented in ubic-admin script POD.
+ # Don't forget to update their description if you change them.
GetOptions(
+ 'local!' => \$opt_local,
'batch-mode' => \$batch_mode,
'quiet' => \$quiet,
'reconfigure!' => \$opt_reconfigure,
@@ -190,7 +193,6 @@ sub setup {
'sticky-777!' => \$opt_sticky_777,
'install-services!' => \$opt_install_services,
'crontab!' => \$opt_crontab,
- 'local!' => \$opt_local,
) or die "Getopt failed";
die "Unexpected arguments '@ARGV'" if @ARGV;
Please sign in to comment.
Something went wrong with that request. Please try again.