Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJérôme Sautret <jerome.sautret@process-one.net>2009-08-06 13:40:22 +0400
committerJérôme Sautret <jerome.sautret@process-one.net>2009-08-06 13:40:22 +0400
commit16be92cc9fd55b6a4672352131c01355a01498f1 (patch)
treeb4c10e33ab956ee0ea773edc80fd1e1029e12548 /tools
parent720fd7605d768458047ad6768b7cb1631858d370 (diff)
* tools/ejabberdctl: fix shell function syntax (EJAB-1003).
* tools/ejabberdctl: use a variable for Erlang shell. SVN Revision: 2422
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ejabberdctl16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/ejabberdctl b/tools/ejabberdctl
index f084059a4..f88ea1838 100755
--- a/tools/ejabberdctl
+++ b/tools/ejabberdctl
@@ -4,6 +4,7 @@ NODE=ejabberd
HOST=localhost
# Define ejabberd environment
+ERL=erl
here=`which "$0" 2>/dev/null || echo .`
base="`dirname $here`/.."
ROOTDIR=`(cd "$base"; echo $PWD)`
@@ -20,9 +21,9 @@ export ERL_MAX_PORTS=32000
[ -d $EJABBERD_DB ] || mkdir -p $EJABBERD_DB
[ -f $EJABBERD_CONFIG_PATH ] || cp $ROOTDIR/src/ejabberd.cfg.example $EJABBERD_CONFIG_PATH
-function start
+start()
{
- erl \
+ $ERL \
-noinput -detached \
-sname $NODE@$HOST \
-pa $EJABBERD_EBIN \
@@ -33,9 +34,9 @@ function start
-sasl sasl_error_logger \{file,\"$SASL_LOG_PATH\"\}
}
-function debug
+debug()
{
- erl \
+ $ERL \
-sname debug$NODE@$HOST \
-pa $EJABBERD_EBIN \
-mnesia dir "\"$EJABBERD_DB\"" \
@@ -43,9 +44,9 @@ function debug
-remsh $NODE@$HOST
}
-function ctl
+ctl()
{
- erl \
+ $ERL \
-noinput \
-sname ejabberdctl@$HOST \
-pa $EJABBERD_EBIN \
@@ -53,7 +54,7 @@ function ctl
-s ejabberd_ctl -extra $NODE@$HOST $@
}
-function usage
+usage()
{
ctl
exit
@@ -66,4 +67,3 @@ case $1 in
debug) debug;;
*) ctl $@;;
esac
-