aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/startup.lua19
1 files changed, 13 insertions, 6 deletions
diff --git a/util/startup.lua b/util/startup.lua
index ce14df71..ab8b61da 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -46,12 +46,19 @@ function startup.parse_args(profile)
end
os.exit(1);
end
- if opts.help and prosody.process_type == "prosody" then
- print("prosody [ -D | -F ] [ --config /path/to/prosody.cfg.lua ]");
- print(" -D, --daemonize Run in the background")
- print(" -F, --no-daemonize Run in the foreground")
- print(" --config FILE Specify config file")
- os.exit(0);
+ if prosody.process_type == "prosody" then
+ if #arg > 0 then
+ print("Unrecognized option: "..arg[1]);
+ print("(Did you mean 'prosodyctl "..arg[1].."'?)");
+ print("");
+ end
+ if opts.help or #arg > 0 then
+ print("prosody [ -D | -F ] [ --config /path/to/prosody.cfg.lua ]");
+ print(" -D, --daemonize Run in the background")
+ print(" -F, --no-daemonize Run in the foreground")
+ print(" --config FILE Specify config file")
+ os.exit(0);
+ end
end
prosody.opts = opts;
end