aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-21 20:52:54 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-21 20:52:54 +0000
commit9fad88be5d39df364cdbe9553697697bbc5e4d0e (patch)
treef3b0d3a18b07b3cd7a872a4eeb5e4520ebdb012c
parent7cecdc95862d3c902dd022cff1851e2aecc3cf6d (diff)
downloadprosody-9fad88be5d39df364cdbe9553697697bbc5e4d0e.tar.gz
prosody-9fad88be5d39df364cdbe9553697697bbc5e4d0e.zip
prosodyctl: Add restart command for KSid and johnny :)
-rwxr-xr-xprosodyctl13
1 files changed, 13 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index 9d2df69e..676085ee 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -433,6 +433,19 @@ function commands.stop(arg)
return 1;
end
+function commands.restart(arg)
+ if arg[1] == "--help" then
+ show_usage([[stop]], [[Stop and start a running Prosody server]]);
+ return 1;
+ end
+
+ local ret = commands.stop(arg);
+ if ret == 0 then
+ ret = commands.start(arg);
+ end
+ return ret;
+end
+
-- ejabberdctl compatibility
function commands.register(arg)