summaryrefslogtreecommitdiffstats
path: root/src/rspamadm/control.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-23 09:29:59 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-23 09:29:59 +0000
commit62fee4b415f9c4e738f7fd5dea441dabe1244d2d (patch)
tree8f651ca15d66928912c0bd03d6ab9ba342f25e40 /src/rspamadm/control.c
parent6a915b7a5c0424514d32d671a272236b10c75604 (diff)
downloadrspamd-62fee4b415f9c4e738f7fd5dea441dabe1244d2d.tar.gz
rspamd-62fee4b415f9c4e738f7fd5dea441dabe1244d2d.zip
Add 'reresolve' command to the control interface
Diffstat (limited to 'src/rspamadm/control.c')
-rw-r--r--src/rspamadm/control.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rspamadm/control.c b/src/rspamadm/control.c
index fc19277eb..42c17650a 100644
--- a/src/rspamadm/control.c
+++ b/src/rspamadm/control.c
@@ -76,7 +76,8 @@ rspamadm_control_help (gboolean full_help)
"--help: shows available options and commands\n\n"
"Supported commands:\n"
"stat - show statistics\n"
- "reload - reload workers dynamic data\n";
+ "reload - reload workers dynamic data\n"
+ "reresolve - resolve upstreams addresses\n";
}
else {
help_str = "Manage rspamd main control interface";
@@ -144,7 +145,7 @@ rspamadm_control (gint argc, gchar **argv)
gint sock;
context = g_option_context_new (
- "keypair - create encryption keys");
+ "control - manage rspamd main control interface");
g_option_context_set_summary (context,
"Summary:\n Rspamd administration utility version "
RVERSION
@@ -158,7 +159,7 @@ rspamadm_control (gint argc, gchar **argv)
exit (1);
}
- if (argc == 0) {
+ if (argc <= 1) {
rspamd_fprintf (stderr, "command required\n");
exit (1);
}
@@ -171,6 +172,9 @@ rspamadm_control (gint argc, gchar **argv)
else if (g_ascii_strcasecmp (cmd, "reload") == 0) {
path = "/reload";
}
+ else if (g_ascii_strcasecmp (cmd, "reresolve") == 0) {
+ path = "/reresolve";
+ }
else {
rspamd_fprintf (stderr, "unknown command: %s\n", cmd);
exit (1);