/[smecontribs]/rpms/ejabberd/contribs7/ejabberd-ejabberdctl_fix.diff
ViewVC logotype

Annotation of /rpms/ejabberd/contribs7/ejabberd-ejabberdctl_fix.diff

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Tue Nov 25 16:20:11 2008 UTC (15 years, 11 months ago) by slords
Branch: MAIN
Changes since 1.2: +0 -0 lines
Restore

1 slords 1.1 --- src/ejabberdctl.template 2008-05-20 14:22:03.000000000 +0400
2     +++ src/ejabberdctl.template 2008-06-22 19:41:03.000000000 +0400
3     @@ -9,12 +9,13 @@
4    
5     # define default environment variables
6     NODE=ejabberd
7     -HOST=localhost
8     +HOST=`hostname -s`
9     ERLANG_NODE=$NODE@$HOST
10     -ROOTDIR=@rootdir@
11     +ROOTDIR=
12     +MAINDIR=
13     EJABBERD_CONFIG_PATH=$ROOTDIR/etc/ejabberd/ejabberd.cfg
14     LOGS_DIR=$ROOTDIR/var/log/ejabberd/
15     -EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE
16     +EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/spool
17    
18     # read custom configuration
19     CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg
20     @@ -42,10 +43,10 @@
21     ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES"
22    
23     # define additional environment variables
24     -EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin
25     -EJABBERD_MSGS_PATH=$ROOTDIR/var/lib/ejabberd/priv/msgs
26     -EJABBERD_SO_PATH=$ROOTDIR/var/lib/ejabberd/priv/lib
27     -EJABBERD_BIN_PATH=$ROOTDIR/var/lib/ejabberd/priv/bin
28     +EJABBERD_EBIN=$MAINDIR/ebin
29     +EJABBERD_MSGS_PATH=$MAINDIR/priv/msgs
30     +EJABBERD_SO_PATH=$MAINDIR/priv/lib
31     +EJABBERD_BIN_PATH=$MAINDIR/priv/bin
32     EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
33     SASL_LOG_PATH=$LOGS_DIR/sasl.log
34     DATETIME=`date "+%Y%m%d-%H%M%S"`
35     @@ -139,11 +140,13 @@
36     # common control function
37     ctl ()
38     {
39     + /sbin/runuser -s /bin/bash - ejabberd -c " \
40     erl \
41     $NAME ejabberdctl \
42     -noinput \
43     -pa $EJABBERD_EBIN \
44     - -s ejabberd_ctl -extra $ERLANG_NODE $@
45     + -s ejabberd_ctl -extra $ERLANG_NODE $@ \
46     + "
47     result=$?
48     case $result in
49     0) :;;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed