aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl6
1 files changed, 3 insertions, 3 deletions
diff --git a/prosodyctl b/prosodyctl
index 76de45a2..0ff03a7b 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -83,7 +83,7 @@ local jid_split = require "util.jid".prepped_split;
local prosodyctl_timeout = (configmanager.get("*", "prosodyctl_timeout") or 5) * 2;
-----------------------
local commands = {};
-local command = arg[1];
+local command = table.remove(arg, 1);
function commands.adduser(arg)
if not arg[1] or arg[1] == "--help" then
@@ -222,7 +222,7 @@ function commands.start(arg)
end
--luacheck: ignore 411/ret
- local ok, ret = prosodyctl.start(prosody.paths.source);
+ local ok, ret = prosodyctl.start(prosody.paths.source, arg[-1]);
if ok then
local daemonize = configmanager.get("*", "daemonize");
if daemonize == nil then
@@ -1365,7 +1365,7 @@ local command_runner = async.runner(function ()
os.exit(0);
end
- os.exit(commands[command]({ select(2, unpack(arg)) }));
+ os.exit(commands[command](arg));
end, watchers);
command_runner:run(true);