Software /
code /
prosody
Comparison
prosodyctl @ 10064:1acfd25cd507
prosodyctl: Fix extraction of interpreter from arg when additional arguments (fixes #1386)
Interpreter goes into the lowest negative index.
See http://www.lua.org/manual/5.2/manual.html#7
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 29 Jun 2019 16:54:39 +0200 |
parent | 9992:9d6baacdd8e6 |
child | 10210:9fdda9fafc3c |
comparison
equal
deleted
inserted
replaced
10063:13ccc2f05007 | 10064:1acfd25cd507 |
---|---|
220 show_message("Prosody is already running with PID %s", ret or "(unknown)"); | 220 show_message("Prosody is already running with PID %s", ret or "(unknown)"); |
221 return 1; | 221 return 1; |
222 end | 222 end |
223 | 223 |
224 --luacheck: ignore 411/ret | 224 --luacheck: ignore 411/ret |
225 local ok, ret = prosodyctl.start(prosody.paths.source, arg[-1]); | 225 local lua; |
226 do | |
227 local i = 0; | |
228 repeat | |
229 i = i - 1; | |
230 until arg[i-1] == nil | |
231 lua = arg[i]; | |
232 end | |
233 local ok, ret = prosodyctl.start(prosody.paths.source, lua); | |
226 if ok then | 234 if ok then |
227 local daemonize = configmanager.get("*", "daemonize"); | 235 local daemonize = configmanager.get("*", "daemonize"); |
228 if daemonize == nil then | 236 if daemonize == nil then |
229 daemonize = prosody.installed; | 237 daemonize = prosody.installed; |
230 end | 238 end |