# HG changeset patch # User Matthew Wild # Date 1647857228 0 # Node ID 929bfe92bb56d7ab4f30ae0086b0a5967d0ce788 # Parent 8e4a5cb2d199158dea10d3eba066dc62f055a85d# Parent 3ae9299d61d7427b2b1fbf82c04eb13de544f762 Merge 0.12->trunk diff -r 8e4a5cb2d199 -r 929bfe92bb56 util/startup.lua --- a/util/startup.lua Sat Mar 19 11:47:52 2022 +0000 +++ b/util/startup.lua Mon Mar 21 10:07:08 2022 +0000 @@ -46,12 +46,19 @@ 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