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

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

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

Revision 1.3 by slords, Tue Nov 25 16:20:11 2008 UTC Revision 1.4 by slords, Mon Aug 24 18:19:21 2009 UTC
# Line 1  Line 1 
1  --- src/ejabberdctl.template    2008-05-20 14:22:03.000000000 +0400  --- src/ejabberdctl.template.fix_user   2008-08-27 13:37:52.000000000 +0400
2  +++ src/ejabberdctl.template    2008-06-22 19:41:03.000000000 +0400  +++ src/ejabberdctl.template    2008-10-02 09:24:52.000000000 +0400
3  @@ -9,12 +9,13 @@  @@ -9,13 +9,14 @@
4    
5   # define default environment variables   # define default environment variables
6   NODE=ejabberd   NODE=ejabberd
7  -HOST=localhost  -HOST=localhost
8  +HOST=`hostname -s`  +HOST=`hostname -s`
9   ERLANG_NODE=$NODE@$HOST   ERLANG_NODE=$NODE@$HOST
10     ERL=@erl@
11  -ROOTDIR=@rootdir@  -ROOTDIR=@rootdir@
12  +ROOTDIR=  +ROOTDIR=
13  +MAINDIR=  +MAINDIR=
# Line 17  Line 18 
18    
19   # read custom configuration   # read custom configuration
20   CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg   CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg
21  @@ -42,10 +43,10 @@  @@ -43,10 +44,10 @@
22   ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES"   ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES"
23    
24   # define additional environment variables   # define additional environment variables
# Line 36  Line 37 
37   # common control function   # common control function
38   ctl ()   ctl ()
39   {   {
40  +    /sbin/runuser -s /bin/bash - ejabberd -c " \  -    $ERL \
41       erl \  +    ERL_COMMAND="$ERL \
42         $NAME ejabberdctl \         $NAME ejabberdctl \
43         -noinput \         -noinput \
44         -pa $EJABBERD_EBIN \         -pa $EJABBERD_EBIN \
45  -      -s ejabberd_ctl -extra $ERLANG_NODE $@  -      -s ejabberd_ctl -extra $ERLANG_NODE $@
46  +      -s ejabberd_ctl -extra $ERLANG_NODE $@ \  +      -s ejabberd_ctl -extra $ERLANG_NODE $@ \
47  +      "  +      "
48    +    /sbin/runuser -s /bin/bash - ejabberd -c "$ERL_COMMAND"
49       result=$?       result=$?
50       case $result in       case $result in
51       0) :;;       0) :;;


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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