summaryrefslogtreecommitdiffstats
path: root/rspamc.pl.in
diff options
context:
space:
mode:
authorcebka@lenovo-laptop <cebka@lenovo-laptop>2010-02-24 17:41:15 +0300
committercebka@lenovo-laptop <cebka@lenovo-laptop>2010-02-24 17:41:15 +0300
commitc6636a9fc339468d02b47498945711d25623b3e5 (patch)
tree7f63240d764d723b7ba8f53c67cb311c71bb5315 /rspamc.pl.in
parent842c12270c2405eeef486286df2276cb7fb18621 (diff)
downloadrspamd-c6636a9fc339468d02b47498945711d25623b3e5.tar.gz
rspamd-c6636a9fc339468d02b47498945711d25623b3e5.zip
* Show help message when rspamd is called without any params (suggested by Andrey Zverev)
Diffstat (limited to 'rspamc.pl.in')
-rwxr-xr-xrspamc.pl.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/rspamc.pl.in b/rspamc.pl.in
index 81a76f1ce..4dddc7e3b 100755
--- a/rspamc.pl.in
+++ b/rspamc.pl.in
@@ -63,6 +63,7 @@ OR <search-key1> <search-key2> - Messages that match either search key (same for
Version: @RSPAMD_VERSION@
EOD
+exit;
};
# Load rspamd config params
@@ -472,7 +473,11 @@ sub do_cmd {
############################# Main part ###########################################
my %args;
+
+HELP_MESSAGE() unless scalar @ARGV >= 1;
+
getopt('c:h:p:P:s:d:w:S:', \%args);
+
my $cmd = shift;
my @path = shift;
my $do_parse_config = 1;
@@ -501,7 +506,6 @@ if (defined ($args{s})) {
}
else {
main::HELP_MESSAGE();
- exit;
}
}
if (defined ($args{h})) {