From a654b27c5b10cdad72654386216dd43ae697b7be Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 30 May 2009 15:37:43 +0400 Subject: [PATCH] * Improve rspamc utility for working without rspamd config --- rspamc.pl.in | 99 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 36 deletions(-) diff --git a/rspamc.pl.in b/rspamc.pl.in index 8a0c53bea..6681fd6d9 100755 --- a/rspamc.pl.in +++ b/rspamc.pl.in @@ -8,6 +8,7 @@ # By default rspamc.pl would read ./rspamd.conf and default command is SYMBOLS use Socket qw(:DEFAULT :crlf); +use Getopt::Std; my %cfg = ( 'conf_file' => '@CMAKE_INSTALL_PREFIX@/etc/rspamd.conf', @@ -20,10 +21,19 @@ my %cfg = ( 'statfile' => '', ); +$main::VERSION = '@RSPAMD_VERSION@'; -sub usage { - return "Usage: rspamc.pl [-c conf_file] [-s statfile] [command]"; -} +sub HELP_MESSAGE { + print <