aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-05-03 01:11:21 +0100
committerMatthew Wild <mwild1@gmail.com>2009-05-03 01:11:21 +0100
commit67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83 (patch)
tree7aac7e2c38a5a98eb1c3d84103800a3a9e09e9d9 /prosodyctl
parent29b41d9efd7e4a84f043b38cfdb51893a4504616 (diff)
parent7be3d9f227ff8083e396497507dbdfe9a6049ca8 (diff)
downloadprosody-67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83.tar.gz
prosody-67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83.zip
Merge with 0.4
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl25
1 files changed, 21 insertions, 4 deletions
diff --git a/prosodyctl b/prosodyctl
index db607833..098f7475 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -238,7 +238,11 @@ function commands.deluser(arg)
return 1;
end
-function commands.start()
+function commands.start(arg)
+ if arg[1] == "--help" then
+ show_usage([[start]], [[Start Prosody]]);
+ return 1;
+ end
local ok, ret = prosodyctl.isrunning();
if not ok then
show_message(error_messages[ret]);
@@ -264,7 +268,12 @@ function commands.start()
return 1;
end
-function commands.status()
+function commands.status(arg)
+ if arg[1] == "--help" then
+ show_usage([[status]], [[Reports the running status of Prosody]]);
+ return 1;
+ end
+
local ok, ret = prosodyctl.isrunning();
if not ok then
show_message(error_messages[ret]);
@@ -280,11 +289,19 @@ function commands.status()
end
show_message("Prosody is running with PID %s", ret or "(unknown)");
return 0;
+ else
+ show_message("Prosody is not running");
+ return 2
end
return 1;
end
-function commands.stop()
+function commands.stop(arg)
+ if arg[1] == "--help" then
+ show_usage([[stop]], [[Stop a running Prosody server]]);
+ return 1;
+ end
+
if not prosodyctl.isrunning() then
show_message("Prosody is not running");
return 1;
@@ -293,7 +310,7 @@ function commands.stop()
local ok, ret = prosodyctl.stop();
if ok then return 0; end
- show_message(error_messages[ret])
+ show_message(error_messages[ret]);
return 1;
end