Software /
code /
prosody
Comparison
util/prosodyctl.lua @ 10046:0bc291a5734a
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Jun 2019 13:22:22 +0200 |
parent | 9781:161411a41377 |
child | 10132:b59535964e81 |
comparison
equal
deleted
inserted
replaced
10045:6714578cfd6e | 10046:0bc291a5734a |
---|---|
227 return ok, pid; | 227 return ok, pid; |
228 end | 228 end |
229 return true, signal.kill(pid, 0) == 0; | 229 return true, signal.kill(pid, 0) == 0; |
230 end | 230 end |
231 | 231 |
232 local function start(source_dir) | 232 local function start(source_dir, lua) |
233 lua = lua and lua .. " " or ""; | |
233 local ok, ret = isrunning(); | 234 local ok, ret = isrunning(); |
234 if not ok then | 235 if not ok then |
235 return ok, ret; | 236 return ok, ret; |
236 end | 237 end |
237 if ret then | 238 if ret then |
238 return false, "already-running"; | 239 return false, "already-running"; |
239 end | 240 end |
240 if not source_dir then | 241 if not source_dir then |
241 os.execute("./prosody"); | 242 os.execute(lua .. "./prosody"); |
242 else | 243 else |
243 os.execute(source_dir.."/../../bin/prosody"); | 244 os.execute(lua .. source_dir.."/../../bin/prosody"); |
244 end | 245 end |
245 return true; | 246 return true; |
246 end | 247 end |
247 | 248 |
248 local function stop() | 249 local function stop() |