/[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.2 by slords, Wed Jun 25 19:02:58 2008 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`  node=`hostname -s`
21    
22  start() {  start() {
23          echo -n $"Starting ejabberd: "          echo -n $"Starting ejabberd: "
24          daemon --user=ejabberd --check=ejabberd \          daemon --user=ejabberd --check=ejabberd \
25              "erl" "-pa @libdir@/ejabberd-@version@/ebin \              "erl" "-pa @libdir@/ejabberd/ebin \
26                     -sname ejabberd \                     -sname ejabberd \
27                     -s ejabberd \                     -s ejabberd \
28                     -ejabberd config \\\"/etc/ejabberd/ejabberd.cfg\\\" \                     -ejabberd config \\\"/etc/ejabberd/ejabberd.cfg\\\" \
# Line 40  start() { Line 40  start() {
40  stop() {  stop() {
41          # Stop daemons.          # Stop daemons.
42          echo -n "Shutting down ejabberd: "          echo -n "Shutting down ejabberd: "
43          /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
44          RETVAL=$?          RETVAL=$?
45          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ejabberd          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ejabberd
46          echo          echo
# Line 74  case "$1" in Line 74  case "$1" in
74          [ -f /var/lock/subsys/ejabberd ] && restart || :          [ -f /var/lock/subsys/ejabberd ] && restart || :
75          ;;          ;;
76    status)    status)
77          /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"
78          ;;          ;;
79    *)    *)
80          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