# HG changeset patch # User Kim Alvefur # Date 1547128646 -3600 # Node ID 161411a4137789f996f8d7621749f250092b6ec9 # Parent c7727c13260f6024d5629bf01ca97a6c894fe697 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. diff -r c7727c13260f -r 161411a41377 util/prosodyctl.lua --- a/util/prosodyctl.lua Thu Jan 10 14:54:34 2019 +0100 +++ b/util/prosodyctl.lua Thu Jan 10 14:57:26 2019 +0100 @@ -229,7 +229,8 @@ 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 @@ 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