From ccc5ce7bf9abe341119acb0aa4a8a138add41dc7 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 5 Jun 2012 09:49:33 +0200 Subject: Changing the command names to something more intuitive (hopefully). --- fripost | 88 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'fripost') diff --git a/fripost b/fripost index e9e27e7..5a80d70 100755 --- a/fripost +++ b/fripost @@ -13,8 +13,8 @@ fripost - Fripost.org handling utility for virtual hosting =head1 SYNOPSIS -B [I] { mkpass | user-add | user-search | user-passwd -| domain-add | domain-search | alias-add | alias-search } +B [I] { mkpass | add-user | search-user | user-passwd +| add-domain | search-domain | add-alias | search-alias } B B<--man> @@ -26,11 +26,11 @@ B B<--man> Create a random new password, and returns its hash. -=item B user-add [I] [B<--password=>I] +=item B add-user [I] [B<--password=>I] Add a new virtual mailbox. -=item B user-search [I] +=item B search-user [I] List matching virtual users. @@ -38,19 +38,19 @@ List matching virtual users. Change user password. -=item B domain-add [I [I]] +=item B add-domain [I [I]] Add a new virtual domain. -=item B domain-search [I [I]] +=item B search-domain [I [I]] List matching virtual domains. -=item B alias-add [B<--force>] [I [I...]] +=item B add-alias [B<--force>] [I [I...]] Add a new virtual alias. -=item B alias-search [B<-f>|B<--from>] [B<-g>|B<--goto>] [I
] +=item B search-alias [B<-f>|B<--from>] [B<-g>|B<--goto>] [I
] List matching virtual aliases. @@ -69,9 +69,9 @@ C is used to generate a salted SHA-1 hash of the given I. If no argument is given, the password is randomly generated, respecting Fripost's password policy. -=item B user-add [I] [B<--password=>I] +=item B add-user [I] [B<--password=>I] -C is used to add a new virtual mailbox to the system, unless +C is used to add a new virtual mailbox to the system, unless B<--pretend> is set. If I or I are not given, the user is prompted for their value. @@ -84,16 +84,16 @@ This can be useful if the user does not want to give the clear copy but only a hash, for example. Using this option disables the sending of credentials. -=item B user-search [I] +=item B search-user [I] -C is used to +C is used to list virtual mailboxes whose username matches exactly I. Wildcards I<*> can appear in I, to match zero or more characters. If no I is given, lists all existing mailboxes. -If I has no domain part, C lists matching users for any +If I has no domain part, C lists matching users for any domains. -Otherwise, C looks up the matching user parts for each matching +Otherwise, C looks up the matching user parts for each matching domain. Because of these multiple searches, the use of wildcards on the domain part of I may be inefficient. @@ -111,31 +111,31 @@ This can be useful if the user does not want to give the clear copy but only a hash, for example. Using this option disables the sending of credentials. -=item B domain-add [I [I]] +=item B add-domain [I [I]] -C is used add a new virtual domain to the system, unless +C is used add a new virtual domain to the system, unless B<--pretend> is set. If I is not given, the user is prompted for its value. -By default, C prompts for the owner(s) of the new +By default, C prompts for the owner(s) of the new domain; Use the empty string I<''> to create a "global" domain, only managed by Fripost's administrators. If I is an existing virtual domain, the owner(s) are simply added to the list of managers. -=item B domain-search [I [I]] +=item B search-domain [I [I]] -C is used to list virtual domains matching exactly I, +C is used to list virtual domains matching exactly I, and whose owner is I. Wildcards I<*> can appear in I, to match zero or more characters. If no I is given, list all domains matching I, regardless of the owner; If I is the empty string I<''>, list only the non self-managed domains. -If neither I nor I are given, C lists +If neither I nor I are given, C lists all existing virtual domains. -=item B alias-add [B<--force>] [I [I...]] +=item B add-alias [B<--force>] [I [I...]] -C is used to add a new virtual alias to the system, unless +C is used to add a new virtual alias to the system, unless B<--pretend> is set. If I or I are not given, the user is prompted for their value. @@ -166,18 +166,18 @@ See B(5) for details and warnings. If serveral entries are matching, for instance if there are an alias from I@I to I and another for I@I to I, emails to I@I will be redirected to BOTH I -and I. Note that C forbids the creation of such +and I. Note that C forbids the creation of such multi-recipient aliases, unless B<--force> is set. -=item B alias-search [B<-f>|B<--from>] [B<-g>|B<--goto>] [I
] +=item B search-alias [B<-f>|B<--from>] [B<-g>|B<--goto>] [I
] -C is used to list virtual aliases whose value or target +C is used to list virtual aliases whose value or target matches exactly I
. As of the current version, wilcards are not allowed in I
; This will be fixed soon. To list matching aliases (resp., targets) only, use the flag B<-f> (resp., B<-g>). -If no I
is given, C lists all existing virtual +If no I
is given, C lists all existing virtual aliases. =back @@ -315,13 +315,13 @@ use YAML::Syck; use Fripost::Schema; use Fripost::Commands::mkpass; -use Fripost::Commands::user_add; -use Fripost::Commands::user_search; +use Fripost::Commands::add_user; +use Fripost::Commands::search_user; use Fripost::Commands::user_passwd; -use Fripost::Commands::domain_add; -use Fripost::Commands::domain_search; -use Fripost::Commands::alias_add; -use Fripost::Commands::alias_search; +use Fripost::Commands::add_domain; +use Fripost::Commands::search_domain; +use Fripost::Commands::add_alias; +use Fripost::Commands::search_alias; ## Get global command line options @@ -372,26 +372,26 @@ if ($cmd eq 'mkpass') { &Fripost::Commands::mkpass::main (@ARGV); exit 0; } -elsif ($cmd eq 'user-add') { - $main = "Fripost::Commands::user_add::main"; +elsif ($cmd eq 'add-user') { + $main = "Fripost::Commands::add_user::main"; } -elsif ($cmd eq 'user-search') { - $main = "Fripost::Commands::user_search::main"; +elsif ($cmd eq 'search-user') { + $main = "Fripost::Commands::search_user::main"; } elsif ($cmd eq 'user-passwd') { $main = "Fripost::Commands::user_passwd::main"; } -elsif ($cmd eq 'domain-add') { - $main = "Fripost::Commands::domain_add::main"; +elsif ($cmd eq 'add-domain') { + $main = "Fripost::Commands::add_domain::main"; } -elsif ($cmd eq 'domain-search') { - $main = "Fripost::Commands::domain_search::main"; +elsif ($cmd eq 'search-domain') { + $main = "Fripost::Commands::search_domain::main"; } -elsif ($cmd eq 'alias-add') { - $main = "Fripost::Commands::alias_add::main"; +elsif ($cmd eq 'add-alias') { + $main = "Fripost::Commands::add_alias::main"; } -elsif ($cmd eq 'alias-search') { - $main = "Fripost::Commands::alias_search::main"; +elsif ($cmd eq 'search-alias') { + $main = "Fripost::Commands::search_alias::main"; } else { pod2usage( -exitstatus => 1, -- cgit v1.2.3