]> granicus.if.org Git - ejabberd/commitdiff
* src/ejabberdctl.template: Move help print to a separate
authorBadlop <badlop@process-one.net>
Sun, 12 Oct 2008 12:00:20 +0000 (12:00 +0000)
committerBadlop <badlop@process-one.net>
Sun, 12 Oct 2008 12:00:20 +0000 (12:00 +0000)
function (EJAB-694)

SVN Revision: 1637

ChangeLog
src/ejabberdctl.template

index 663b8150d074377f479b9ddb25bc3caf2c08684b..29e933c93ef66810a239a505108288ea095964ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-10-12  Badlop  <badlop@process-one.net>
 
+       * src/ejabberdctl.template: Move help print to a separate
+       function (EJAB-694)
+
        * src/ejabberd_ctl.erl: Add frontend support for
        commands (EJAB-694). Categorization and sorting of commands in
        ejabberd_ctl help (EJAB-313). Lines in command line help of length
index 02ebd56b5489ef7b5762c31072cf8ad206f9df97..15e252cdfd50188db700db328c235cc5667d0930 100644 (file)
@@ -163,6 +163,23 @@ live ()
       $ERLANG_OPTS $ARGS \"$@\""
 }
 
+help ()
+{
+    echo ""
+    echo "Commands to start an ejabberd node:"
+    echo "  start  Start an ejabberd node in server mode"
+    echo "  debug  Attach an interactive Erlang shell to a running ejabberd node"
+    echo "  live   Start an ejabberd node in live (interactive) mode"
+    echo ""
+    echo "Optional parameters when starting an ejabberd node:"
+    echo "  --config file      Config ejabberd:    $EJABBERD_CONFIG_PATH"
+    echo "  --ctl-config file  Config ejabberdctl: $EJABBERDCTL_CONFIG_PATH"
+    echo "  --logs dir         Directory for logs: $LOGS_DIR"
+    echo "  --spool dir        Database spool dir: $SPOOLDIR"
+    echo "  --node nodename    ejabberd node name: $ERLANG_NODE"
+    echo ""
+}
+
 # common control function
 ctl ()
 {
@@ -175,20 +192,9 @@ ctl ()
     result=$?
     case $result in
     0) :;;
-    *)
-        echo ""
-        echo "Commands to start an ejabberd node:"
-        echo "  start  Start an ejabberd node in server mode"
-        echo "  debug  Attach an interactive Erlang shell to a running ejabberd node"
-        echo "  live   Start an ejabberd node in live (interactive) mode"
-        echo ""
-        echo "Optional parameters when starting an ejabberd node:"
-        echo "  --config file      Config file of ejabberd:    $EJABBERD_CONFIG_PATH"
-        echo "  --ctl-config file  Config file of ejabberdctl: $EJABBERDCTL_CONFIG_PATH"
-        echo "  --logs dir         Directory for logs:         $LOGS_DIR"
-        echo "  --spool dir        Database spool dir:         $SPOOLDIR"
-        echo "  --node nodename    ejabberd node name:         $ERLANG_NODE"
-        echo "";;
+    1) :;;
+    2) help;;
+    3) help;;
     esac
     return $result
 }