aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-26 18:51:31 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-26 18:51:31 +0300
commit120980beba47758d7627038760382ee57f0d33ab (patch)
tree2213a14df2f90bf79a0a4f1a30be27a30b2a9a7a /src/util.c
parentcfb5348f75790ef694edd5a9c131890eeceec204 (diff)
downloadrspamd-120980beba47758d7627038760382ee57f0d33ab.tar.gz
rspamd-120980beba47758d7627038760382ee57f0d33ab.zip
* Fix logging when process is starting
* Add -t option for config testing * Try to search default config in install prefix not in current directory
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index cffa5e06b..a7aea229c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -118,7 +118,7 @@ void
read_cmd_line (int argc, char **argv, struct config_file *cfg)
{
int ch;
- while ((ch = getopt(argc, argv, "hfc:")) != -1) {
+ while ((ch = getopt(argc, argv, "thfc:")) != -1) {
switch (ch) {
case 'f':
cfg->no_fork = 1;
@@ -128,13 +128,17 @@ read_cmd_line (int argc, char **argv, struct config_file *cfg)
cfg->cfg_name = memory_pool_strdup (cfg->cfg_pool, optarg);
}
break;
+ case 't':
+ cfg->config_test = 1;
+ break;
case 'h':
case '?':
default:
/* Show help message and exit */
printf ("Rspamd version " RVERSION "\n"
- "Usage: rspamd [-h] [-n] [-f] [-c config_file]\n"
+ "Usage: rspamd [-t] [-h] [-n] [-f] [-c config_file]\n"
"-h: This help message\n"
+ "-t: Do config test and exit\n"
"-f: Do not daemonize main process\n"
"-c: Specify config file (./rspamd.conf is used by default)\n");
exit (0);