mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
util.prosodyctl: Allow passing path to Lua runtime to the start() function
By default the shebang is used. Being able to override it is useful in cases where the shebang does not match the configured runtime.
This commit is contained in:
parent
e31667cf15
commit
8d8c6bd619
1 changed files with 4 additions and 3 deletions
|
@ -229,7 +229,8 @@ local function isrunning()
|
|||
return true, signal.kill(pid, 0) == 0;
|
||||
end
|
||||
|
||||
local function start(source_dir)
|
||||
local function start(source_dir, lua)
|
||||
lua = lua and lua .. " " or "";
|
||||
local ok, ret = isrunning();
|
||||
if not ok then
|
||||
return ok, ret;
|
||||
|
@ -238,9 +239,9 @@ local function start(source_dir)
|
|||
return false, "already-running";
|
||||
end
|
||||
if not source_dir then
|
||||
os.execute("./prosody");
|
||||
os.execute(lua .. "./prosody");
|
||||
else
|
||||
os.execute(source_dir.."/../../bin/prosody");
|
||||
os.execute(lua .. source_dir.."/../../bin/prosody");
|
||||
end
|
||||
return true;
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue