Software /
code /
prosody
Comparison
prosodyctl @ 2511:a81c710b1708
prosodyctl: Don't display message about failing to start Prosody is daemonizing is disabled (if daemonizing is disabled then Prosody is stopped by the time control returns to prosodyctl, which then can't see Prosody running)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 28 Jan 2010 15:05:30 +0000 |
parent | 2510:97b5ea975cb9 |
child | 2515:50517948705c |
comparison
equal
deleted
inserted
replaced
2510:97b5ea975cb9 | 2511:a81c710b1708 |
---|---|
339 return 1; | 339 return 1; |
340 end | 340 end |
341 | 341 |
342 local ok, ret = prosodyctl.start(); | 342 local ok, ret = prosodyctl.start(); |
343 if ok then | 343 if ok then |
344 local i=1; | 344 if config.get("*", "core", "daemonize") ~= false then |
345 while true do | 345 local i=1; |
346 local ok, running = prosodyctl.isrunning(); | 346 while true do |
347 if ok and running then | 347 local ok, running = prosodyctl.isrunning(); |
348 break; | 348 if ok and running then |
349 elseif i == 5 then | 349 break; |
350 show_message("Still waiting..."); | 350 elseif i == 5 then |
351 elseif i >= prosodyctl_timeout then | 351 show_message("Still waiting..."); |
352 show_message("Prosody is still not running. Please give it some time or check your log files for errors."); | 352 elseif i >= prosodyctl_timeout then |
353 return 2; | 353 show_message("Prosody is still not running. Please give it some time or check your log files for errors."); |
354 end | 354 return 2; |
355 socket.sleep(0.5); | 355 end |
356 i = i + 1; | 356 socket.sleep(0.5); |
357 end | 357 i = i + 1; |
358 show_message("Started"); | 358 end |
359 show_message("Started"); | |
360 end | |
359 return 0; | 361 return 0; |
360 end | 362 end |
361 | 363 |
362 show_message("Failed to start Prosody"); | 364 show_message("Failed to start Prosody"); |
363 show_message(error_messages[ret]) | 365 show_message(error_messages[ret]) |