diff -r 2d57c49bfa12 -r d770435f0f84 util/startup.lua --- a/util/startup.lua Mon Jun 15 14:23:47 2020 +0100 +++ b/util/startup.lua Wed Jun 17 19:32:12 2020 +0200 @@ -20,10 +20,20 @@ local value_params = { config = true }; function startup.parse_args() - prosody.opts = parse_args(arg, { + local opts, err, where = parse_args(arg, { short_params = short_params, value_params = value_params, }); + if not opts then + if err == "param-not-found" then + print("Unknown command-line option: "..tostring(where)); + print("Perhaps you meant to use prosodyctl instead?"); + elseif err == "missing-value" then + print("Expected a value to follow command-line option: "..where); + end + os.exit(1); + end + prosody.opts = opts; end function startup.read_config()