]> git.pld-linux.org Git - packages/omniORB.git/blob - omniORB.init
- killed trailing spaces/tabs
[packages/omniORB.git] / omniORB.init
1 #!/bin/sh
2 #
3 # omniORB:      Starts omniORB
4 #
5 # chkconfig:    345 85 15
6 # description:  This is a daemon which handles CORBA connections for \
7 #               example for 3dwm.
8 # processname:  omniNames
9 # config:       /etc/omniORB.cfg
10 #
11
12 # Sanity checks.
13 [ -f /etc/omniORB.cfg ] || exit 0
14
15 # Source function library.
16 . /etc/rc.d/init.d/functions
17
18 # Get sysconfig
19 [ -f /etc/sysconfig/omniORB ] && . /etc/sysconfig/omniORB
20
21 RETVAL=0
22 # See how we were called.
23 case "$1" in
24   start)
25         if [ ! -f /var/lock/subsys/omniORB ]; then
26                 msg_starting "omniNames for omniORB"
27                 if [ -f "/var/log/omniORB/omninames-$(hostname).log" ]; then
28                         START=
29                 else
30                         START=-start
31                 fi
32                 daemon "sh -c 'omniNames $START -errlog /var/log/omniORB/omninames-err.log &'"
33                 RETVAL=$?
34                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/omniORB
35         else
36                 msg_already_running "omniNames for omniORB"
37         fi
38         ;;
39   stop)
40         if [ -f /var/lock/subsys/omniORB ]; then
41                 msg_stopping "omniNames for omniORB"
42                 killproc omniNames
43                 rm -f /var/lock/subsys/omniORB >/dev/null 2>&1
44         else
45                 msg_not_running "omniNames for omniORB"
46         fi
47         ;;
48   status)
49         status omniNames
50         exit $?
51         ;;
52   restart|force-reload)
53         $0 stop
54         $0 start
55         exit $?
56         ;;
57   *)
58         msg_usage "$0 {start|stop|restart|force-reload|status}"
59         exit 3
60 esac
61
62 exit $RETVAL
This page took 0.060827 seconds and 3 git commands to generate.