aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-28 15:05:30 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-28 15:05:30 +0000
commitdc665996150ab5a77e3aa4ee552b9e61e2964975 (patch)
tree8bcc7cf7b385932a0b790b16ebe84727bf8845f0 /prosodyctl
parent08284a586ec1213f7f22e86fb6950b5f335915a9 (diff)
downloadprosody-dc665996150ab5a77e3aa4ee552b9e61e2964975.tar.gz
prosody-dc665996150ab5a77e3aa4ee552b9e61e2964975.zip
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)
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl28
1 files changed, 15 insertions, 13 deletions
diff --git a/prosodyctl b/prosodyctl
index 00e67bd9..260b3b8f 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -341,21 +341,23 @@ function commands.start(arg)
local ok, ret = prosodyctl.start();
if ok then
- local i=1;
- while true do
- local ok, running = prosodyctl.isrunning();
- if ok and running then
- break;
- elseif i == 5 then
- show_message("Still waiting...");
- elseif i >= prosodyctl_timeout then
- show_message("Prosody is still not running. Please give it some time or check your log files for errors.");
- return 2;
+ if config.get("*", "core", "daemonize") ~= false then
+ local i=1;
+ while true do
+ local ok, running = prosodyctl.isrunning();
+ if ok and running then
+ break;
+ elseif i == 5 then
+ show_message("Still waiting...");
+ elseif i >= prosodyctl_timeout then
+ show_message("Prosody is still not running. Please give it some time or check your log files for errors.");
+ return 2;
+ end
+ socket.sleep(0.5);
+ i = i + 1;
end
- socket.sleep(0.5);
- i = i + 1;
+ show_message("Started");
end
- show_message("Started");
return 0;
end