aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xprosodyctl10
1 files changed, 9 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index f5786ff9..3809beff 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -222,7 +222,15 @@ function commands.start(arg)
end
--luacheck: ignore 411/ret
- local ok, ret = prosodyctl.start(prosody.paths.source, arg[-1]);
+ local lua;
+ do
+ local i = 0;
+ repeat
+ i = i - 1;
+ until arg[i-1] == nil
+ lua = arg[i];
+ end
+ local ok, ret = prosodyctl.start(prosody.paths.source, lua);
if ok then
local daemonize = configmanager.get("*", "daemonize");
if daemonize == nil then