/[smecontribs]/rpms/ejabberd/contribs7/ejabberd.init
ViewVC logotype

Diff of /rpms/ejabberd/contribs7/ejabberd.init

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

Revision 1.1 by slords, Thu May 8 19:50:17 2008 UTC Revision 1.5 by slords, Mon Aug 24 18:19:21 2009 UTC
# Line 17  Line 17 
17    
18  . /etc/rc.d/init.d/functions  . /etc/rc.d/init.d/functions
19    
20  node=`hostname | cut -d. -f1`  if [ -r /etc/sysconfig/ejabberd ]; then
21            . /etc/sysconfig/ejabberd
22    fi
23    
24    if [ ! "$CONFIG_FILE" ]; then
25            CONFIG_FILE=/etc/ejabberd/ejabberd.cfg
26    fi
27    
28    node=`hostname -s`
29    
30  start() {  start() {
31          echo -n $"Starting ejabberd: "          echo -n $"Starting ejabberd: "
32            if [ "$ULIMIT_MAX_FILES" ]; then
33                    ulimit -n $ULIMIT_MAX_FILES
34            fi
35          daemon --user=ejabberd --check=ejabberd \          daemon --user=ejabberd --check=ejabberd \
36              "erl" "-pa @libdir@/ejabberd-@version@/ebin \              "erl" "-pa @libdir@/ejabberd/ebin \
37                     -sname ejabberd \                     -sname ejabberd \
38                     -s ejabberd \                     -s ejabberd \
39                     -ejabberd config \\\"/etc/ejabberd/ejabberd.cfg\\\" \                     -ejabberd config \\\"$CONFIG_FILE\\\" \
40                               log_path \\\"/var/log/ejabberd/ejabberd.log\\\" \                               log_path \\\"/var/log/ejabberd/ejabberd.log\\\" \
41                     -sasl sasl_error_logger \\{file,\\\"/var/log/ejabberd/sasl.log\\\"\\} \                     -sasl sasl_error_logger \\{file,\\\"/var/log/ejabberd/sasl.log\\\"\\} \
42                     -mnesia dir \\\"/var/lib/ejabberd/spool\\\" \                     -mnesia dir \\\"/var/lib/ejabberd/spool\\\" \
# Line 40  start() { Line 51  start() {
51  stop() {  stop() {
52          # Stop daemons.          # Stop daemons.
53          echo -n "Shutting down ejabberd: "          echo -n "Shutting down ejabberd: "
54          /sbin/runuser -s /bin/bash - ejabberd -c "erl -pa @libdir@/ejabberd-@version@/ebin -noinput -sname ejabberdctl -s ejabberd_ctl -extra ejabberd@$node stop" && success || failure          /sbin/runuser -s /bin/bash - ejabberd -c "erl -pa @libdir@/ejabberd/ebin -noinput -sname ejabberdctl -s ejabberd_ctl -extra ejabberd@$node stop" && success || failure
55          RETVAL=$?          RETVAL=$?
56          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ejabberd          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ejabberd
57          echo          echo
# Line 74  case "$1" in Line 85  case "$1" in
85          [ -f /var/lock/subsys/ejabberd ] && restart || :          [ -f /var/lock/subsys/ejabberd ] && restart || :
86          ;;          ;;
87    status)    status)
88          /sbin/runuser -s /bin/bash - ejabberd -c "erl -pa @libdir@/ejabberd-@version@/ebin -noinput -sname ejabberdctl -s ejabberd_ctl -extra ejabberd@$node status"          /sbin/runuser -s /bin/bash - ejabberd -c "erl -pa @libdir@/ejabberd/ebin -noinput -sname ejabberdctl -s ejabberd_ctl -extra ejabberd@$node status"
89          ;;          ;;
90    *)    *)
91          echo "Usage: ejabberd {start|stop|restart|force-reload|condrestart|try-restart|status}"          echo "Usage: ejabberd {start|stop|restart|force-reload|condrestart|try-restart|status}"


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