aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-03-21 10:07:08 +0000
committerMatthew Wild <mwild1@gmail.com>2022-03-21 10:07:08 +0000
commitcc40d15df7fd89acc7d3fc563220dd163743e811 (patch)
treeebb9242965aa04e0dd48ccbbe477b83f9bec3b75 /util
parent5d0ae73a2a13ab9d6b19db62661d9227ed302f4d (diff)
parentff2a6d764e1dc56197b05c7c1c64b8b5832f0ed1 (diff)
downloadprosody-cc40d15df7fd89acc7d3fc563220dd163743e811.tar.gz
prosody-cc40d15df7fd89acc7d3fc563220dd163743e811.zip
Merge 0.12->trunk
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