/[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.4 - (hide annotations) (download)
Mon Aug 24 18:19:21 2009 UTC (15 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: ejabberd-2_0_5-2_el4_sme, HEAD
Changes since 1.3: +8 -6 lines
New package import

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

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