Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / rpmbuild / ace-tao-init-fedora / rc.d / init.d / tao-rtevent
blob43d2e038ed7a6b5f2459ef3cf07310c8d09613f4
1 #!/bin/bash
3 # chkconfig: - 81 14
4 # description: Starts and stops the TAO Event Service.
5 # processname: tao-rtevent
6 # config: /etc/tao/tao-rtevent.opt
7 # config: /etc/tao/tao-rtevent.conf
8 # pidfile: /var/run/tao-rtevent.pid
10 # Source function library.
11 . /etc/init.d/functions
13 # Source configuration options
14 . /etc/tao/tao-rtevent.opt
16 RETVAL=0
18 prog="tao-rtevent"
19 progpath="/usr/sbin/$prog"
20 svcconf="/etc/tao/${prog}.conf"
21 lockpath="/var/lock/subsys/$prog"
22 pidpath="/var/run/${prog}.pid"
24 start()
26 echo -n $"Starting $prog: "
27 daemon --user tao $progpath -p $pidpath $OPTIONS -ORBSvcConf $svcconf -ORBDaemon
28 RETVAL=$?
29 [ "$RETVAL" = 0 ] && touch $lockpath
30 echo
33 stop()
35 echo -n $"Stopping $prog: "
36 killproc $progpath -TERM
37 RETVAL=$?
38 if [ $RETVAL -eq 0 ] ; then
39 rm -f $lockpath
40 rm -f $pidpath
42 echo
45 # See how we were called.
46 case "$1" in
47 start)
48 start
50 stop)
51 stop
53 status)
54 status $prog
55 RETVAL=$?
57 restart)
58 stop
59 start
60 RETVAL=$?
62 condrestart)
63 if [ -f $lockpath ]; then
64 stop
65 start
66 RETVAL=$?
69 reload)
72 echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
73 exit 1
75 esac
76 exit $RETVAL